XPolicyLab policy adapter for Inspect Robots — evaluate any XPolicyLab-served VLA policy (π0, GR00T, OpenVLA-OFT, RDT, ACT, ...) with Inspect Robots.
Project description
inspect-robots-xpolicylab
Drive any XPolicyLab-served policy from Inspect Robots.
XPolicyLab unifies 40+ VLA and imitation-learning policies (π0 / π0.5,
GR00T N1.7, OpenVLA-OFT, RDT-1B, SmolVLA, ACT, Diffusion Policy, …) behind one
policy-server contract: each policy runs in its own conda/uv environment and
serves inference over a websocket protocol. This plugin is the Inspect Robots
side of that wire: a Policy adapter that connects to a running XPolicyLab
policy server, so the whole policy zoo becomes evaluable with any Inspect
Robots embodiment and task.
The adapter speaks XPolicyLab's msgpack-over-websocket protocol directly — it
does not depend on the xpolicylab package (which is not on PyPI). Only
the policy server needs an XPolicyLab checkout.
Install
pip install inspect-robots-xpolicylab
The xpolicylab policy then appears in inspect-robots list policies.
Quickstart
Terminal 1 — serve a policy from your XPolicyLab checkout (its own environment, possibly another machine; see the XPolicyLab README for per-policy install/checkpoint details):
cd XPolicyLab/policy/Pi_0
bash setup_eval_policy_server.sh <bench_name> <task_name> <ckpt_name> \
<env_cfg_type> <action_type> <seed> <policy_gpu_id> <policy_env> 19000 0.0.0.0
Terminal 2 — evaluate it with Inspect Robots:
inspect-robots run --task my-task --policy xpolicylab --embodiment isaacsim \
-P url=ws://gpu-box:19000 -P cameras=cam_head:base_rgb
or programmatically:
from inspect_robots import eval
from inspect_robots_xpolicylab import XPolicyLabPolicy
with XPolicyLabPolicy(url="ws://gpu-box:19000", cameras="cam_head:base_rgb") as policy:
log = eval("my-task", policy, "isaacsim")
Constructing the policy and reading .info never touch the network — the
websocket connects on first reset()/act(), with retries while the policy
server cold-starts (loading VLA weights can take minutes).
Configuration
| Arg | Default | Meaning |
|---|---|---|
url |
ws://localhost:19000 |
policy server websocket URL |
action_type |
joint |
joint → *arm_joint_state actions; ee → *ee_pose |
arms |
1 |
1 or 2 (dual-arm uses left_*/right_* keys) |
arm_dim / ee_dim |
7 / 1 |
per-arm joint dims / gripper dims |
cameras |
cam_head:cam_head |
XPolicyLab camera slot → Inspect Robots camera name |
state_map |
see below | XPolicyLab state key → Inspect Robots state key |
required_state_keys |
joint: joint_pos,gripper; ee: none |
state keys enforced by compatibility checking |
action_keys + action_dim |
derived | explicit ordered action-dict keys for exotic setups |
camera_height / camera_width |
unset | declare camera resolution for compatibility checks |
control_hz |
unset | chunk playback rate; also sent as additional_info.frequency |
name |
xpolicylab |
policy name in logs (tag runs e.g. xpolicylab:pi0) |
connect_timeout_s / request_timeout_s |
30 / 120 |
client timeouts |
connect_attempts / connect_retry_delay_s |
10 / 5 |
cold-start retry budget |
Mapping-valued args accept a compact string form for the CLI:
-P cameras=cam_head:base_rgb,cam_wrist:wrist_rgb.
Default state_map (all XPolicyLab state fields are optional; mapped keys
missing from an observation are simply not sent):
| XPolicyLab key | Inspect Robots key |
|---|---|
arm_joint_state |
joint_pos |
ee_joint_state |
gripper |
ee_pose |
eef_pose |
Action mapping
Each infer reply is an action chunk — one dict per future control step.
Dicts flatten to vectors in a fixed order: for each arm (left then right), the
arm key then the end-effector key. The default single-arm joint profile is
concat(arm_joint_state, ee_joint_state) → dim 8, matching the
inspect-robots-isaacsim default Franka profile.
Lifecycle notes
reset(scene)ends the previous trial server-side (trial_end) and starts a freshtrial_id;close()ends any open trial and says goodbye.eval()closes embodiments it resolves, not policies — usewith/close()in programmatic runs. A best-effortatexithook covers registry-resolved CLI runs.- If the socket drops mid-eval, the trial in flight errors and the next
reset()/act()reconnects (replaying thehellohandshake).
Protocol compatibility
Validated against XPolicyLab commit
fe71eb54675cef495fea817a637386a4f4529153. The protocol carries no version
field; if upstream changes the wire format, _protocol.py is the single small
module to diff and update.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inspect_robots_xpolicylab-0.1.0.tar.gz.
File metadata
- Download URL: inspect_robots_xpolicylab-0.1.0.tar.gz
- Upload date:
- Size: 21.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1bdedcc29f76255be376118ce9e119214964b44764414361db953d82cfc0c13
|
|
| MD5 |
752e6c721893191daff2847e88f39768
|
|
| BLAKE2b-256 |
7f29a891ee46b575d7bde2c6ab38ac537e6b45e8b8d3cd52e50426ce44a527d9
|
Provenance
The following attestation bundles were made for inspect_robots_xpolicylab-0.1.0.tar.gz:
Publisher:
release.yml on robocurve/inspect-robots
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inspect_robots_xpolicylab-0.1.0.tar.gz -
Subject digest:
c1bdedcc29f76255be376118ce9e119214964b44764414361db953d82cfc0c13 - Sigstore transparency entry: 2132395025
- Sigstore integration time:
-
Permalink:
robocurve/inspect-robots@4dff231a008f27e55f07a1b95cdd668b8166ba98 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/robocurve
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4dff231a008f27e55f07a1b95cdd668b8166ba98 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file inspect_robots_xpolicylab-0.1.0-py3-none-any.whl.
File metadata
- Download URL: inspect_robots_xpolicylab-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3371178fec9f81d0654f3bb35c841bba7dd4cbea5fe3141ae40d8ff4c2916179
|
|
| MD5 |
b2eac17bb95653be45cff8b96ef440c2
|
|
| BLAKE2b-256 |
eb4fdbde8ee8f6a42b092d74d5566820412f7afc1eda1001ed1c74caee173caa
|
Provenance
The following attestation bundles were made for inspect_robots_xpolicylab-0.1.0-py3-none-any.whl:
Publisher:
release.yml on robocurve/inspect-robots
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
inspect_robots_xpolicylab-0.1.0-py3-none-any.whl -
Subject digest:
3371178fec9f81d0654f3bb35c841bba7dd4cbea5fe3141ae40d8ff4c2916179 - Sigstore transparency entry: 2132395714
- Sigstore integration time:
-
Permalink:
robocurve/inspect-robots@4dff231a008f27e55f07a1b95cdd668b8166ba98 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/robocurve
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4dff231a008f27e55f07a1b95cdd668b8166ba98 -
Trigger Event:
workflow_dispatch
-
Statement type: