SkyRL is a full-stack reinforcement learning library for training LLMs, designed for modularity and extensibility.
- Always use
uv run --isolatedto run commands. Never use barepython,pip, orpip install. - Log output to files:
<cmd> > /tmp/results_1.log 2>&1for persistence. - Backend extras (
fsdp,megatron,jax) conflict with each other -- never combine them. - Always read the relevant documentation files in
.claude/docsbefore troubleshooting or working on any changes. Follow the routing rules below.
# CPU tests
uv run --extra dev --extra jax pytest tests/tx/ tests/tinker/ tests/utils/
uv run --extra dev pytest tests/train/ tests/backends/skyrl_train/ --ignore=tests/backends/skyrl_train/gpu/
# GPU tests (requires Ray cluster with GPUs)
uv run --isolated --extra dev --extra fsdp pytest tests/backends/skyrl_train/gpu/gpu_ci/test_engine_generation.py
uv run --isolated --extra dev --extra megatron pytest tests/backends/skyrl_train/gpu/gpu_ci/test_megatron_worker.py
# Lint / format
bash format.shuv run --isolated --extra megatron -m skyrl.train.entrypoints.main_base \
trainer.strategy=megatron trainer.policy.model.path=<model> environment.env_class=gsm8k ...When working on these areas, read the corresponding doc first:
| Area | Read first |
|---|---|
| Package management, uv, formatting | .claude/docs/development.md |
| Overall guide for modifying or working with SkyRL | .claude/docs/contributing.md |
| Tests, fixtures, CI quirks | .claude/docs/testing.md |
| Project layout, Ray actors, config | .claude/docs/architecture.md |
| Training entrypoints, configs | .claude/docs/training.md |
| Inference engines, vLLM, PD disagg | .claude/docs/inference.md |
| GitHub Actions, Anyscale CI | .claude/docs/ci.md |
| Tinker API server | .claude/docs/tinker.md |
| Megatron backend | .claude/docs/backends/megatron.md |
| FSDP backend | .claude/docs/backends/fsdp.md |
| JAX/TPU backend | .claude/docs/backends/jax.md |
| Weight sync | .claude/docs/weight_sync.md |
For troubleshooting training runs with SkyRL:
- Go through the troubleshooting section in the docs for known errors:
docs/content/docs/troubleshooting/troubleshooting.mdx - Go through the contributing guide for overall guidelines:
.claude/docs/contributing.md