Languages: English | 简体中文
- Fork and clone the repository.
- Install dependencies for your platform:
- macOS (MPS, installs PyPI torch wheels):
uv sync - Linux default (installs PyTorch cu128 wheels; requires an NVIDIA GPU/driver supported by current PyTorch cu128 wheels):
uv sync - Linux AMD / ROCm workstation:
make sync-rocm, then run commands withuv run --no-sync ... - When you need Motrix, append
--extra motrix
- macOS (MPS, installs PyPI torch wheels):
- Create a branch such as
git checkout -b docs/improve-readmeorgit checkout -b fix/backend-bug.
- Always use
uv run; do not invokepythonoutsideuv run - Run
make checkbefore code-related commits - Keep backup files, temporary exports, and legacy compatibility copies out of the source tree; do not commit artifacts such as
*.bak,*.tmp,*.old,*.orig, or editor backup files ending in~ - For user-facing workflow changes, keep
README.md,CONTRIBUTING.md, and the matching localized docs underdocs/in sync - Do not add new owner logic under
src/unilab/utils/; the currentsrc/unilab/utils/*.pyfiles are transition shims only and are scheduled for removal in0.2.0 - Name new owner modules and packages after their responsibility: prefer singular nouns, use plural only for collection-valued contracts, and reserve suffixes such as
_factoryfor factory modules
- Before changing training entrypoints, runners, env contracts, or backend paths, read RL Infrastructure Development Standard
- Before changing collaboration flow or issue / milestone rules, read Collaboration Workflow
make format # ruff format + ruff check --fix
make sync-rocm # Linux AMD / ROCm >= 7.1: sync deps and install torch==2.11.0+rocm7.2
make type # mypy src/unilab + pyright
make check # format + type (required before code-related commits)
make test # non-slow tests
make test-cov # non-slow tests + coverage report
make test-slow # slow integration and training smoke tests
make test-all # make check && make test-covUse Conventional Commits:
feat:new featurefix:bug fixdocs:documentation updatestyle:formatting only, no logic changerefactor:code refactortest:test-related changechore:build or tooling
- For code or config changes, run
make checklocally so lint, mypy, and pyright pass. - For code changes, run
make testlocally so non-slow tests pass. - If you touched IPC, Runner, or Config, add or update the matching tests.
- For docs-only changes, run
uv run pytest tests/scripts/test_check_docs.py -qat minimum. - If you touched repository hygiene rules, run
uv run pytest tests/scripts/test_repo_hygiene.py -q. - Link the relevant GitHub issue and fill in validation plus impact scope in the PR template.
- Open the PR against
mainand wait for green CI. - Wait for code review.
Use GitHub Issues to report bugs or propose features.
- Architecture & contracts: RL Infrastructure Development Standard
- Collaboration & ADR governance: Collaboration Workflow
- Test layout & markers: Development Standard §Testing
- Configuration system: Development Standard §Configuration