Skip to main content
The evaluation server script (gr00t/eval/run_gr00t_server.py) runs a policy as a network server, allowing multiple clients to send observations and receive actions over TCP.

Usage

Parameters

Policy configuration

str
default:"None"
Path to the model checkpoint directory for GR00T policy inference.Either model-path or dataset-path must be provided.
EmbodimentTag
default:"NEW_EMBODIMENT"
Embodiment tag identifying the robot configuration. See embodiment tags.
str
default:"cuda"
Device to run the model on: cuda, cuda:0, cuda:1, or cpu.

Replay policy configuration

str
default:"None"
Path to a dataset for replay policy (replays recorded trajectories instead of running inference).Use this for debugging or baseline comparisons.
str
default:"None"
Path to a JSON file containing modality configuration for replay policy.If not provided, uses default configuration from MODALITY_CONFIGS[embodiment_tag].
int
default:"None"
Policy execution horizon during inference. If specified, overrides the default horizon.

Server configuration

str
default:"0.0.0.0"
Host address for the server. Use 0.0.0.0 to accept connections from any network interface.
int
default:"5555"
Port number for the server to listen on.
bool
default:"True"
Whether to enforce strict input and output validation. Recommended to keep enabled for production.
bool
default:"False"
Whether to wrap the policy with Gr00tSimPolicyWrapper for simulation-specific processing.Enable this when serving policies for simulation environments.

Example workflows

Serve a GR00T policy

Output:

Serve for simulation

Serve a replay policy

Multi-GPU setup

Run multiple servers on different GPUs:

Client usage

Connect to the server using PolicyClient:

With open-loop evaluation

With closed-loop evaluation

Policy types

Gr00tPolicy

Loaded when model-path is provided:
  • Runs transformer-based policy inference
  • Supports all GR00T embodiments
  • GPU-accelerated
  • Configurable via embodiment-tag and device

ReplayPolicy

Loaded when dataset-path is provided:
  • Replays actions from recorded demonstrations
  • Useful for testing data collection pipelines
  • Configurable via modality-config-path and execution-horizon

Server protocol

The server implements a simple request-response protocol:
  1. Client sends observation dictionary
  2. Server runs policy inference
  3. Server returns action dictionary and metadata
The PolicyServer class handles:
  • TCP socket management
  • Request serialization/deserialization
  • Multi-client support (sequential processing)
  • Graceful shutdown on KeyboardInterrupt

Performance considerations

  • Single client per server: The server processes requests sequentially. For parallel inference, run multiple servers on different ports/GPUs.
  • Batch size: Each request processes a single observation. For higher throughput, use local policy inference instead.
  • Network latency: Server adds network overhead. For real-time applications, consider deploying on the same machine as the client.
The server does NOT authenticate clients. Only run on trusted networks or add authentication if deploying in production.

Troubleshooting

Port already in use

Change the port:

Model path not found

Verify the checkpoint directory exists and contains model files.

CUDA out of memory

Reduce batch size, use a smaller model, or switch to CPU: