opentau.configs.deployment

Deployment configuration classes for inference servers.

This module provides configuration classes for deploying trained models as inference servers, including gRPC server settings.

Classes

PlannerConfig([enabled, model, api_key_env, ...])

Configuration for the high-level planner of the gRPC inference server.

ServerConfig([port, max_workers, ...])

Configuration for the gRPC inference server.

class opentau.configs.deployment.PlannerConfig(enabled: bool = False, model: str = 'gemini-robotics-er-1.5-preview', api_key_env: str = 'GEMINI_API_KEY', interval_s: float = 5.0, first_plan_timeout_s: float = 30.0, max_output_tokens: int = 512, temperature: float = 0.0, include_state: bool = True, system_prompt_key: str = 'gemini_er_planner_system', user_prompt_key: str = 'gemini_er_planner_user')[source]

Bases: object

Configuration for the high-level planner of the gRPC inference server.

When enabled is False (the default), the inference server runs the VLA policy only. When enabled, a Gemini Robotics-ER planner runs asynchronously alongside the policy: it consumes the latest observation (images, state) plus the request prompt (treated as the overall task) and a memory-as-language string, and produces the subtask the VLA policy is conditioned on.

Parameters:
  • enabled – Whether to spin up the high-level planner. Defaults to False.

  • model – Gemini model ID used for planning. Defaults to gemini-robotics-er-1.5-preview.

  • api_key_env – Environment variable holding the Gemini API key (GOOGLE_API_KEY is also tried as a fallback). Defaults to GEMINI_API_KEY.

  • interval_s – Wall-clock seconds between planner calls. The planner runs on its own free-running background loop, decoupled from request arrival; the VLA path never blocks on replanning and reads whatever subtask is currently available. The loop skips a cycle when no new observation arrived since the last plan. Defaults to 5.0.

  • first_plan_timeout_s – Maximum seconds a request blocks at the start of inference for a task (no subtask available yet) waiting for the initial subtask. On timeout the request falls back to the raw task prompt. Defaults to 30.0.

  • max_output_tokens – Generation cap for the planner response. Defaults to 512.

  • temperature – Sampling temperature for the planner. Defaults to 0.0.

  • include_state – Whether to include the robot proprioceptive state in the planner prompt. Defaults to True.

  • system_prompt_key – Key into planner/prompts.yaml for the system prompt template.

  • user_prompt_key – Key into planner/prompts.yaml for the user prompt template.

Raises:

ValueError – If interval_s, first_plan_timeout_s or max_output_tokens are out of range.

__init__(enabled: bool = False, model: str = 'gemini-robotics-er-1.5-preview', api_key_env: str = 'GEMINI_API_KEY', interval_s: float = 5.0, first_plan_timeout_s: float = 30.0, max_output_tokens: int = 512, temperature: float = 0.0, include_state: bool = True, system_prompt_key: str = 'gemini_er_planner_system', user_prompt_key: str = 'gemini_er_planner_user') None
api_key_env: str = 'GEMINI_API_KEY'
enabled: bool = False
first_plan_timeout_s: float = 30.0
include_state: bool = True
interval_s: float = 5.0
max_output_tokens: int = 512
model: str = 'gemini-robotics-er-1.5-preview'
system_prompt_key: str = 'gemini_er_planner_system'
temperature: float = 0.0
user_prompt_key: str = 'gemini_er_planner_user'
class opentau.configs.deployment.ServerConfig(port: int = 50051, max_workers: int = 4, max_send_message_length_mb: int = 100, max_receive_message_length_mb: int = 100, dataset_repo_id: str | None = None, robot_type: str | None = None, control_mode: str | None = None)[source]

Bases: object

Configuration for the gRPC inference server.

This class contains all configuration parameters needed to run a gRPC inference server for robot policy models.

Parameters:
  • port – Port number to serve on. Must be between 1 and 65535. Defaults to 50051.

  • max_workers – Maximum number of gRPC worker threads for handling concurrent requests. Defaults to 4.

  • max_send_message_length_mb – Maximum size of outgoing messages in megabytes. Defaults to 100.

  • max_receive_message_length_mb – Maximum size of incoming messages in megabytes. Defaults to 100.

Raises:

ValueError – If port is not in valid range or max_workers is less than 1.

Example

>>> config = ServerConfig(port=50051, max_workers=8)
>>> config.port
50051
__init__(port: int = 50051, max_workers: int = 4, max_send_message_length_mb: int = 100, max_receive_message_length_mb: int = 100, dataset_repo_id: str | None = None, robot_type: str | None = None, control_mode: str | None = None) None
control_mode: str | None = None
dataset_repo_id: str | None = None
property max_receive_message_length: int

Get maximum receive message length in bytes.

Returns:

Maximum receive message length in bytes.

max_receive_message_length_mb: int = 100
property max_send_message_length: int

Get maximum send message length in bytes.

Returns:

Maximum send message length in bytes.

max_send_message_length_mb: int = 100
max_workers: int = 4
port: int = 50051
robot_type: str | None = None