X1 DH policy export
Use this sub-skill only for the registered x1_dh_stand model conversion
pipeline and its serialized artifacts. Keep the two stages distinct:
- Checkpoint → JIT:
model_<iteration>.pt → policy_dh.jit.
- JIT → ONNX:
policy_dh.jit → x1_policy.onnx.
The ONNX stage never reopens a training checkpoint, and its --checkpoint
argument does not select one.
Route by intent
| Intent |
Route |
| Select a runner checkpoint and convert it to JIT |
Stay here; use export workflows |
| Convert an existing JIT policy to ONNX |
Stay here; use export workflows |
| Check paths, checkpoint structure, or a serialized artifact |
Stay here; use preflight_export.py and the artifact contract |
| Produce or resume a training checkpoint |
Use training |
| Run a runner checkpoint interactively in Isaac Gym |
Use playback |
| Run an exported policy in MuJoCo |
Use sim2sim after JIT validation |
Do not use this route to train, launch Isaac Gym playback, run MuJoCo, or claim
robot/simulation safety.
Required backend boundary
Both repository export entry points import humanoid.envs; their parser/helper
import chain also requires Isaac Gym Preview 4. That backend is unavailable
in the verified construction environment. Therefore full source checkpoint →
JIT and JIT → ONNX execution remains:
BLOCKED_REQUIRED_BACKEND: Isaac Gym Preview 4 unavailable
Do not stub Isaac Gym, bypass task registration, or promote a bundled-helper
pass to full source-export verification. A compatible source environment must
provide the repository's documented Python 3.8, PyTorch 1.13.1/CUDA 11.7,
NumPy 1.23.x, editable project install, and verified Isaac Gym Preview 4.
ONNX conversion additionally needs a compatible onnx installation.
The bundled preflight deliberately avoids project and Isaac Gym imports. It can
perform path checks everywhere and can inspect trusted local artifacts only
when the corresponding already-installed model library is available.
Safe operating sequence
Obtain an exact run/checkpoint handoff from training.
Prefer explicit run names and checkpoint numbers; do not let “latest” select
an unrelated artifact.
From this sub-skill directory, inspect the helper interface:
python scripts/preflight_export.py --help
Follow export workflows for stage-specific
preflight, source commands, destination paths, and validation. Deserialize
only trusted checkpoints; torch.load may execute pickle payloads.
Enforce the fixed X1 contract in artifact contract:
input (1, 3102), deterministic output (1, 12), and exact artifact type
for the requested stage.
Preserve the source script's printed input/output paths, explicit task, run,
checkpoint or JIT timestamp, and package/backend versions in the handoff.
On failure, use export troubleshooting and
keep backend, missing-input, and failed-artifact states distinct.
Non-negotiable artifact rules
x1_dh_stand is the only verified task contract in this sub-skill.
- Checkpoint → JIT reconstructs
ActorCriticDH, strictly loads
model_state_dict, and scripts a CPU wrapper containing the actor, state
estimator, and long-history encoder.
- JIT → ONNX loads a prior
policy_dh.jit; select its timestamp with
--load_run. The shared --checkpoint flag is ignored by that converter.
- Source outputs use
logs/, not the README's stale singular log/ spelling.
JIT and ONNX go to different trees; see artifact contract.
- A CPU load/shape check validates serialization only. It does not verify
training-time observation construction, Isaac Gym behavior, MuJoCo behavior,
controller integration, or robot safety.
1---2name: export-23description: "Route AgiBot X1 DH checkpoint-to-JIT export, JIT-to-ONNX4 conversion, artifact preflight, validation, and backend-aware failure5 recovery."6disable-model-invocation: true7metadata:8 source: https://skillmd.com/skills/vectorspacelab/export-29 disco-role: operating10license: NO_LICENSE11---1213# X1 DH policy export1415Use this sub-skill only for the registered `x1_dh_stand` model conversion16pipeline and its serialized artifacts. Keep the two stages distinct:17181. **Checkpoint → JIT:** `model_<iteration>.pt` → `policy_dh.jit`.192. **JIT → ONNX:** `policy_dh.jit` → `x1_policy.onnx`.2021The ONNX stage never reopens a training checkpoint, and its `--checkpoint`22argument does not select one.2324## Route by intent2526| Intent | Route |27| --- | --- |28| Select a runner checkpoint and convert it to JIT | Stay here; use [export workflows](references/workflows.md#3-checkpoint--jit) |29| Convert an existing JIT policy to ONNX | Stay here; use [export workflows](references/workflows.md#4-jit--onnx) |30| Check paths, checkpoint structure, or a serialized artifact | Stay here; use [preflight_export.py](scripts/preflight_export.py) and the [artifact contract](references/artifact-contract.md) |31| Produce or resume a training checkpoint | Use [training](../training/SKILL.md) |32| Run a runner checkpoint interactively in Isaac Gym | Use [playback](../playback/SKILL.md) |33| Run an exported policy in MuJoCo | Use [sim2sim](../sim2sim/SKILL.md) after JIT validation |3435Do not use this route to train, launch Isaac Gym playback, run MuJoCo, or claim36robot/simulation safety.3738## Required backend boundary3940Both repository export entry points import `humanoid.envs`; their parser/helper41import chain also requires **Isaac Gym Preview 4**. That backend is unavailable42in the verified construction environment. Therefore full source checkpoint →43JIT and JIT → ONNX execution remains:4445**BLOCKED_REQUIRED_BACKEND: Isaac Gym Preview 4 unavailable**4647Do not stub Isaac Gym, bypass task registration, or promote a bundled-helper48pass to full source-export verification. A compatible source environment must49provide the repository's documented Python 3.8, PyTorch 1.13.1/CUDA 11.7,50NumPy 1.23.x, editable project install, and verified Isaac Gym Preview 4.51ONNX conversion additionally needs a compatible `onnx` installation.5253The bundled preflight deliberately avoids project and Isaac Gym imports. It can54perform path checks everywhere and can inspect trusted local artifacts only55when the corresponding already-installed model library is available.5657## Safe operating sequence58591. Obtain an exact run/checkpoint handoff from [training](../training/SKILL.md#checkpoints-and-handoff).60 Prefer explicit run names and checkpoint numbers; do not let “latest” select61 an unrelated artifact.622. From this sub-skill directory, inspect the helper interface:6364 ```bash65 python scripts/preflight_export.py --help66 ```67683. Follow [export workflows](references/workflows.md) for stage-specific69 preflight, source commands, destination paths, and validation. Deserialize70 only trusted checkpoints; `torch.load` may execute pickle payloads.714. Enforce the fixed X1 contract in [artifact contract](references/artifact-contract.md):72 input `(1, 3102)`, deterministic output `(1, 12)`, and exact artifact type73 for the requested stage.745. Preserve the source script's printed input/output paths, explicit task, run,75 checkpoint or JIT timestamp, and package/backend versions in the handoff.766. On failure, use [export troubleshooting](references/troubleshooting.md) and77 keep backend, missing-input, and failed-artifact states distinct.7879## Non-negotiable artifact rules8081- `x1_dh_stand` is the only verified task contract in this sub-skill.82- Checkpoint → JIT reconstructs `ActorCriticDH`, strictly loads83 `model_state_dict`, and scripts a CPU wrapper containing the actor, state84 estimator, and long-history encoder.85- JIT → ONNX loads a prior `policy_dh.jit`; select its timestamp with86 `--load_run`. The shared `--checkpoint` flag is ignored by that converter.87- Source outputs use `logs/`, not the README's stale singular `log/` spelling.88 JIT and ONNX go to different trees; see [artifact contract](references/artifact-contract.md).89- A CPU load/shape check validates serialization only. It does not verify90 training-time observation construction, Isaac Gym behavior, MuJoCo behavior,91 controller integration, or robot safety.