maple.backend.policy.base.PolicyBackend
- class maple.backend.policy.base.PolicyBackend
Abstract base class for Docker-based policy backends.
Provides comprehensive container management and model serving capabilities for vision-language-action policies. Handles Docker orchestration, GPU configuration, health monitoring, and HTTP-based inference.
The backend manages the full lifecycle: 1. Pull: Download Docker image and model weights from HuggingFace 2. Serve: Start container with GPU support and load model 3. Act: Serve inference requests with image encoding 4. Stop: Clean up container and resources
Configuration is read from ~/.vla/config.yaml with fallback to class defaults.
Methods
__init__()Initialize the policy backend.
act(handle, payload, instruction[, model_kwargs])Get action prediction from the policy.
get_info(handle)Get information about a running policy instance.
health(handle)Check health of a policy instance.
info()Get backend information and capabilities.
pull(version, dst)Pull model weights from HuggingFace and Docker image.
Pull or verify the policy Docker image.
serve(version, model_path, device[, ...])Start policy container and load model.
stop(handle)Stop a running policy container.
wait_for_ready(handle)Wait for container to be ready to accept requests.
Attributes