rfx.deploy() is the main entry point. It handles everything: load policy,
resolve robot config, create robot, run the control loop.
Signature
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
policy | str | Path | required | Path to policy dir, hf://org/repo, or .py file. |
robot | str | Path | auto | Robot type (so101, go2, g1) or YAML config path. |
port | str | auto | Serial port or IP override. |
rate_hz | float | config | Control loop frequency. Defaults to robot config. |
duration | float | None | None | Run time in seconds. None runs until Ctrl+C. |
mock | bool | False | Use MockRobot instead of real hardware. |
device | str | "cpu" | Torch device for inference. |
warmup | float | 0.5 | Seconds to sleep after reset before starting. |
Return value
Returns a stats object with timing information:Auto-detection
If the policy artifact stored a robot config (viapolicy.save(..., robot_config=config)), robot is inferred automatically. Explicit robot
or config overrides the stored value.

