mjlab
Use mjlab for MuJoCo Warp robot-learning environments, manager-based MDP configuration, RSL-RL training/playback, sensors, terrain, and debugging workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- mjlab
- license
- Apache 2.0
- metadata
- { "scenarios": [ "reinforcement-learning-workflows", "embodied-ai-simulation" ], "disco-role": "operating" }
- description
- Use mjlab for MuJoCo Warp robot-learning environments, manager-based MDP configuration, RSL-RL training/playback, sensors, terrain, and debugging workflows.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/installation-runtime.md3.1 KB
- 参考文档references/package-overview.md3.2 KB
- 参考文档references/repo-provenance.md3.1 KB
- 参考文档references/repo-routing-metadata.json510 B
- 参考文档references/troubleshooting.md3.0 KB
- 脚本scripts/mjlab_environment_smoke.py2.6 KB
03 SKILL.md 正文
mjlab
mjlab is a lightweight robot-learning framework that brings an Isaac Lab-style manager API to MuJoCo Warp. Use this repo skill when a task involves composing robot simulation scenes, writing manager-based RL environments, configuring MDP terms, training or playing policies with RSL-RL, using cameras/raycasts/contact sensors, generating terrain, exporting scenes, or debugging NaNs/rendering.
Fast orientation
- Package/import name:
mjlab. - Public command surface:
train,play,demo,list-envs,export-scene, andviz-nan. - Primary runtime: Linux with NVIDIA CUDA for training and full MuJoCo Warp throughput. CPU mode is useful for config loading, CLI help, and some evaluation/debugging tasks; it is not proof of full GPU training behavior.
- CLI parsing uses Tyro: boolean values must be explicit and collection values use Python-literal syntax.
Read installation-runtime.md before installing or choosing CPU/GPU/Docker execution. Read package-overview.md for the architectural map and high-value entry points. Read troubleshooting.md for cross-cutting install, backend, CLI, rendering, W&B, and data issues. Use scripts/mjlab_environment_smoke.py for a safe installed-package smoke check.
Route by task
| If the user asks about... | Read this |
|---|---|
ManagerBasedRlEnvCfg, observation/reward/event/command dictionaries, term lifecycle, reset/step ordering, SceneEntityCfg, custom manager terms |
environment-configuration |
SceneCfg, EntityCfg, MJCF/spec editing, simulation config, asset-zoo robots, variants, scene export API internals |
scene-simulation-assets |
| action configs, actuator configs, built-in observations/rewards/terminations/events/commands/curriculum/metrics, differential IK, task-specific MDP terms | mdp-components |
| cameras, raycasts, contacts, terrain generation, flat patches, terrain curricula, domain randomization, sensor context or rendering issues | perception-terrain-randomization |
list-envs, train, play, demo, export-scene, viz-nan, task registry, RSL-RL configs, checkpoints, W&B, motion CSV/NPZ, cloud/distributed training |
training-evaluation-cli |
Safe first commands
Use the installed package, not a source checkout, for normal user workflows:
uv run list-envs
uv run train Mjlab-Cartpole-Balance --help
uv run play Mjlab-Cartpole-Balance --help
uv run export-scene g1 --help
For package-level verification from any project that has mjlab installed, copy this skill's smoke script into a temporary location or run it by path:
uv run python path/to/mjlab_environment_smoke.py --json
Installation decision points
- For a new uv-managed user project, prefer
uv add mjlab. - For contributing to mjlab itself, use
uv syncand invoke commands withuv run. - For Linux NVIDIA training, use the CUDA-capable dependency variant selected by the project environment or a Docker image with the NVIDIA container runtime.
- For macOS or CPU-only machines, limit expectations to evaluation, config inspection, CLI help, and workflows that do not require CUDA graph capture.
Do not use this skill when
- The task is about a generic RL algorithm library unrelated to mjlab's environment/runtime layer.
- The task requires Isaac Sim or Omniverse APIs rather than MuJoCo/MuJoCo Warp.
- The user is asking for benchmark systemd jobs, W&B sweeps, or cloud launches without explicitly authorizing credentials, network access, and GPU cost.
- The user is editing this repository's code as a maintainer task; then combine this operating skill with normal repository-maintenance evidence and tests.
Provenance and routing metadata
- repo-provenance.md records the source commit, tag, package version, and evidence baseline used to create this skill.
- repo-routing-metadata.json is the structured import metadata for the managed repo-skills router.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).