Developer docsCompute · Arena · API

MuJoCo and MJX workflow

Package, run, evaluate, and compare a MuJoCo-family robotics workflow.

Simulation and learning engineers · 11 min · Updated
Markdown

Choose classic MuJoCo or MJX deliberately

The same HIM contracts can wrap different execution shapes.
RuntimeGood fitTypical resource
MuJoCoSingle/few environments, debugging, deterministic evaluation, CPU renderingCPU standard or modest GPU for policy inference
MJXLarge batched JAX rollouts and accelerator trainingGPU standard/high-memory depending on batch and model
BraxJAX-native training and fast batched physics where task fidelity fitsGPU standard

Run the workflow

Run your repository
# Run the repository's native command locally, or launch bounded SSH compute:
him compute --key ~/.ssh/id_ed25519.pub --profile gpu
# Connect with the returned SSH command and run the project normally.

# Publish the source and real result video afterward:
him upload ./project.zip --video ./result.mp4 --kind both \
  --run-command "./run.sh" --yes --json

Declare the native entrypoint

Relevant .him/him.yaml section
entrypoints:
  - id: evaluate
    purpose: evaluation
    execution_mode: python
    command: [python, -m, my_project.him_evaluate]
    working_directory: .
    runtime_interface_ref: .him/contracts/runtime.json
    resource_class: cpu-standard
    network_policy: none
    secret_refs: []
    timeout_seconds: 1800
compatibility:
  frameworks: [mujoco, jax]
publication:
  visibility: private

Keep the project’s native command. The adapter should accept an immutable run spec and attempt-scoped paths, then write trajectory/state and environment evidence. Do not move simulator code into HIM or translate JAX checkpoints to PyTorch.

Map the simulator boundary

  • Robot and model identity: exact MJCF/URDF/assets digest and adapter version.
  • Observation names, ordering, shapes, units, rates, frame conventions, and normalization.
  • Action names, ordering, units, limits, control mode, decimation, and fallback behavior.
  • Seed, reset/initial state, episode horizon, termination, truncation, and intervention semantics.
  • Candidate trajectory/state paths, evaluator input/output path, logs, render inputs, and expected media.
  • Evaluator digest and metric definitions. Reward logged by training may be useful, but only the isolated evaluator publishes official metrics.

Connect your simulator safely

  1. Package the smallest existing smoke scenario and keep its native command.
  2. Declare the robot assets, observations, actions, units, reset behavior, evaluator, and expected outputs.
  3. Run him doctor and resolve missing assets, commands, licenses, runtime requirements, or signal mappings.
  4. Run one short private scenario, freeze its outputs, evaluate separately, and render only recorded state.
  5. Repeat the same seeds and test cancellation, timeout, and failure paths before publishing a result.

Use MJX rollouts in a training job

Approved package command shape
# Launch bounded SSH compute, then use the repository's native trainer:
him compute --key ~/.ssh/id_ed25519.pub --profile gpu-48gb
# Connect with the returned SSH command. When finished:
him machine stop <machine-id>

The package’s train entrypoint owns the JAX/PyTorch loop and checkpoint format. HIM records attempts, runtime limits, checkpoints, resume history, private artifacts, and later evaluation. Hosted execution is available only for runtime profiles that have passed environment and output checks.