PolicyClient
model and reads its metadata. If the server offers a direct route to its GPU container, the client reconnects there and closes the proxied connection.
str
required
The model ID:
"pi05", "pi0" or "groot". It fills {model} in WALLE_URL.KeyErrorifWALLE_URLis not set.websockets.exceptions.InvalidStatus,InvalidURIorOSErrorif the server can’t be reached.
infer
dict
required
Camera frames, state, prompt and any request options. The keys depend on the model. See Observations.
np.ndarray | dict[str, np.ndarray]
π0 and π0.5 return a
float32 array of shape (action_horizon, action_dim), for example (50, 32). GR00T returns a dict of float32 arrays, one per action group, each of shape (1, action_horizon, k).dict
If the server rejects the observation,
infer returns {"type": "error", "message": str} and does not raise. The connection stays open, so you can fix the observation and call again. Check for this before executing actions. See Troubleshooting..copy() on one if you need to modify it in place.
reset
get_server_metadata
int
Actions per chunk.
list[int]
[height, width] the server resizes frames to.bool
Whether observations should carry a
session_id.int
π0 and π0.5 only. Width of each action.
int
π0 and π0.5 only. Maximum cameras per observation.
str
π0 and π0.5 only.
"joint_position".list[str]
GR00T only. Keys of the returned action dict.
str
GR00T only. The robot embodiment the server runs.
str
Present when the server offers a direct route. The client uses it automatically.
close
close() raises websockets.exceptions.ConnectionClosed.
Environment variables
relay reads these from the environment, or from a .env file in the working directory or any parent directory. Variables already set in the environment take precedence.