Contributing

This guide describes how to propose a change to ImitationLab: the branch and pull-request workflow, the checks to run, where code belongs, and what to record when reporting results. Please use GitHub issues for bugs and questions; the bug report and feature request templates list what to include. Report security problems privately as described in SECURITY.md. Everyone taking part in the project is expected to follow the code of conduct.

Before you start. Install Pixi and the environments described in setup. Run all commands from the repository root.

Workflow

  1. Create a feature branch from main. Use one branch for a coherent change.

  2. Make the change and run the checks.

  3. Open a pull request against main. Describe the behavior you changed and include the commands and results that exercise it; the pull-request template has the checklist.

git switch main
git switch -c feature/my-change
pixi install --locked
pixi run test-default
pixi run -e static ci-static

Checks

Command

When

Covers

pixi run test-default

Every change

CPU test suites

pixi run -e static ci-static

Every change

ruff check and ruff format --check over the whole repository, and a compile check

pixi run -e isaaclab test-isaaclab

Simulator or environment changes

Isaac Lab suite on a local GPU

pixi run -e docs docs-build

Documentation changes

Builds the documentation site and fails on a broken link

BANK=<bank> pixi run -e isaaclab smoke-g1

Trainer or simulator wiring changes

The local Isaac Lab smoke on a packed reference bank

CI runs the first two commands and the documentation build. Run pixi run -e static ruff format . before committing. To run the ruff and file checks on every commit, run pixi run pre-commit install once; the default environment provides pre-commit.

Tests

Put a new test file in the tests/ directory of the package it covers. A guard test fails when a test file is not run by any test-* pixi task.

Where code belongs

Follow the package boundaries in architecture.

Kind of code

Location

Reusable policy learners

imitationlab/algorithms/

Command encoders

imitationlab/encoders/

G1 tasks

imitationlab/envs/isaaclab/

Motion processing

imitationlab/data_tools/

Reusable run settings

experiments/recipes/

Entry points (keep them thin)

scripts/

Adding a learner or a command interface

  • New policy learner. Provide settings for the existing observation and action contract and wire it through the training launcher.

  • New command interface. Specify its encoding and checkpoint contract and test that the live and imagined observations agree.

  • Task contract changes. Version the public task ID when its observation, action, or MDP contract changes.

Reporting results

Record the resolved task ID, command interface, policy learner, seed, motion manifest or bank identity, and encoder hash when reporting results.

Keep machine-specific paths, credentials, datasets, and checkpoints outside Git.

Documentation

Update the corresponding setup or training guide when changing an entry point or recipe. Write command-line options in kebab-case (--num-envs); the snake-case spellings recorded by earlier runs remain accepted. The documentation index lists every guide.

The guides are also built into a site. docs/_site/ holds its landing page, navigation, and build script; add a new guide to a table of contents in docs/_site/index.md. After pixi run -e docs docs-build, pixi run -e docs docs-serve serves the result at http://localhost:8000.