Training

From VectorSpaceLab/AREX-Skill · View interactive version

Training is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Route X1 DH stand PPO training, configuration inspection, checkpoint lifecycle, and algorithm-only shape checks with explicit Isaac Gym backend limits.

How to use this skill

Skill file

X1 DH training

Use this sub-skill for the registered x1_dh_stand task: installing the

training stack, inspecting its configuration and observation contract, building

a bounded training command, running DH PPO, resuming from a checkpoint, and

triaging runner or tensor-shape failures.

Backend boundary

The environment is an Isaac Gym Preview 4 task and its native environment,

terrain, asset, and train.py execution require Isaac Gym plus a compatible

CUDA/PhysX setup. Isaac Gym Preview 4 is unavailable in the current Creator

environment. Mark native training as

BLOCKED_REQUIRED_BACKEND: Isaac Gym Preview 4 unavailable unless the user

provides and verifies that dependency. Never replace it with a fake simulator.

CPU/Torch checks in this route validate only configuration arithmetic, policy

wiring, and rollout-buffer shapes; they do not validate Isaac Gym behavior.

MuJoCo playback is outside this route; after a checkpoint, hand off to

playback or sim2sim. For JIT or

ONNX artifacts, use export.

Start here

  1. Read workflows for install, bounded launch,

resume, checkpoint, and logging procedures.

  1. Read configuration before changing any

dimension, history stack, command, gait, terrain, PD, reward, or

randomization field.

  1. Read algorithm API for DH actor/critic,

DHPPO, runner, and RolloutStorage contracts.

  1. Use troubleshooting for backend, import,

shape, OOM, checkpoint, and logging symptoms.

  1. Run the safe helper first:

python scripts/training_preflight.py --help, then

python scripts/training_preflight.py --print-command --num-envs 1 --max-iterations 1.

The helper never starts training. --shape-smoke is a CPU-only algorithm

check; --check-config attempts a real config import and may report the

required-backend block.

Task and install contract

explicitly because the generic parser's default task is not this task.

NumPy 1.23.x, Isaac Gym Preview 4, and pip install -e .. The package

metadata also requests TensorBoard and several playback/export dependencies.

Treat exact legacy versions as compatibility requirements, not as proof that

they are installed.

instructions, install its Python package, verify an Isaac Gym example, and

only then install this package. If that artifact is absent, stop at static

inspection or the CPU algorithm smoke.

--run_name=<run_name> --headless` from the repository root. Isaac Gym's

gymutil parser supplies simulator flags in addition to the custom flags;

keep --rl_device and simulator device choices explicit on multi-device

systems.

Operating rules

c_frame_stack=3 as coupled invariants. The actor consumes 66 frames of 47

features; the critic consumes 3 frames of 73 privileged features.

num_privileged_obs=219, and num_actions=12 aligned with the network and

rollout storage. See the full feature accounting in configuration.

this task uses heading_command=False, so the effective commanded triple is

(x, y, yaw). The five command-related observation values are gait sine,

gait cosine, and the three scaled velocity commands—not five user commands.

fifth action or bypass the policy's action clipping and PD torque limits.

controlled ablation. Record changes to friction, pushes, mass/COM, gains,

torque, joint friction/damping/armature, motor offsets, Coulomb friction, and

action/DOF lag because they change the sim-to-real assumptions.

without Isaac Gym: environment construction creates a PhysX simulation and

loads the X1 asset. Prefer the bundled helper and static values first.

verification. Record backend status separately in any handoff.

Checkpoints and handoff

The runner writes TensorBoard and checkpoint files under the project log root,

by default in logs/x1_dh_stand/exported_data/<timestamp><run_name>/.

Checkpoints are model_<iteration>.pt; the runner saves at iteration 0 and

then every save_interval=100, and saves one final checkpoint after the loop.

Each checkpoint contains model_state_dict, optimizer states, estimator

optimizer state, iter, and infos. `--resume --load_run <run> --checkpoint

<N> selects a run/checkpoint. In the config object load_run=-1` means latest,

but the source CLI declares --load_run as a string and can pass literal -1

as a directory name; omit that flag for configured latest behavior or pass an

exact run name. --checkpoint=-1 is an integer sentinel for the latest model.

Resume loading intentionally omits optimizer state in the registry path, so

report that when comparing resumed runs.

After training, route only the resulting artifact to playback, export, or

sim2sim. Do not make this sub-skill perform interactive playback, export, or

MuJoCo behavior.

Verification and hard cases

Run static frontmatter/link checks, the preflight --help and invariant output,

and --shape-smoke when Torch is available. A native train command is a

required-backend candidate and must be labeled blocked when Isaac Gym Preview 4

is unavailable. Proposed difficult usability cases for verification are:

  1. A user requests num_single_obs=48 or frame_stack=5: the agent must

detect the 47/66/5 observation and CNN reshape contract, explain every

dependent field, and refuse to launch until all dimensions are reconciled.

  1. A user resumes with --load_run -1 --checkpoint -1 after a run directory

contains model_0.pt, sparse periodic checkpoints, and a stale exported

directory: the agent must select the sorted latest model, distinguish the

model's stored iter from its filename, and explain the optimizer-state

omission before continuing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.