cicd

par nvidia

Référence CI/CD pour NeMo-RL. Couvre la structure du pipeline GitHub Actions, le déclenchement du CI via /ok to test, et l'investigation des échecs du CI.

npx skills add https://github.com/nvidia-nemo/rl --skill cicd

CI/CD Guide


How CI Works

NeMo-RL CI runs on GitHub Actions. Workflows live in .github/workflows/.

The main test workflow triggers on pushes to pull-request/<number> branches. These branches are created automatically by copy-pr-bot when a contributor pushes to their fork and the PR receives a trust signal:

  • The commit is GPG-signed by a maintainer, or
  • A maintainer posts /ok to test <full-sha> as a PR comment.

Triggering CI

After pushing a new commit to your PR, trigger CI with:

/ok to test <full-commit-sha>

Use git rev-parse HEAD (not the short form) to get the full SHA.

Re-triggering after new commits: each /ok to test <sha> is specific to that SHA. After pushing additional commits, post a new comment with the updated SHA.

Nightly CI with /nightly-ci

Members of the automation or rl_autobot_approvers GitHub teams can comment /nightly-ci test-case=<test> to run NVIDIA's nightly CI and build the RL image from the PR head. Fork PRs first need /ok to test <full-sha> vetting and a copy-pr-bot mirror matching that head.

With run_as: requester, the pipeline runs as the commenter. NVIDIA employees must enroll once as described in the internal Autobot /nightly-ci docs; unenrolled requests receive a neutral check. See the CI/CD guide for settings and the Autobot nightly CI check. A new push supersedes the run without cancelling the running pipeline.


CI Labels

Every PR must have exactly one CI:* label — the quality-check job stays red until one is attached. A bot sets it (see below). Labels control which test tier runs and whether a new container image is built.

LabelWhat runsContainer
CI:docsLint + Sphinx docs build onlyNone (no GPU)
CI:LfastFast test subsetReuses main container (PRs to a release branch such as r0.8.0 reuse that branch's container, published only by pushes to that branch after merges)
CI:L0Unit tests + docs + lintBuilds new image
CI:L1L0 + functional testsBuilds new image
CI:L2Same as L1 today (plan to add convergence tests)Builds new image
Skip CICDNothing (skips all tests)—

Default on merge group / push to main: L1.

The label is set automatically. The Set CI label workflow (.github/scripts/ci_label.py) picks it from the changed files on every push, first match wins:

Changed filesLabel
Any pyproject.toml, uv.lock, Dockerfile*, docker/**.sh, docker/**.py or 3rdparty/**CI:L1
Only *.md, docs/**, skills/**, or .github/** files the main CI run doesn't readCI:docs
Anything elseCI:Lfast

These .github/ files feed the main CI run, so they still mean CI:Lfast: workflows/cicd-main.yml, workflows/_build_container.yml, actions/test-template/*, scripts/plan-tests.sh, scripts/checkout-megatron-lm-commit.sh, scripts/install-megatron-lock-artifact.sh and scripts/known-flake-patterns.txt.

Only repo maintainers (admin or maintain role) can change it, for example to CI:L1 for a broad core change, or add Skip CICD. A label anyone else sets is replaced, and the bot says so in one PR comment. A maintainer's label stays until a push changes the bot's own pick. Agents: do not set or change CI:* labels on PRs to main. Release branches have no label bot, so cp-to-release still copies the original PR's label.


CI Failure Investigation

# List recent workflow runs for the PR
gh run list --repo NVIDIA-NeMo/RL --branch "pull-request/<pr-number>"

# View failing run summary
gh run view <run-id> --repo NVIDIA-NeMo/RL

# Stream failing job output
gh run view <run-id> --repo NVIDIA-NeMo/RL --log-failed

Common failure patterns:

SymptomLikely causeFix
CI never startsNo trust signal or copy-pr-bot not triggeredPost /ok to test <sha>
semantic-pull-request failsPR title doesn't follow Conventional CommitsFix PR title; see contributing skill
Linting failsStyle violationRun uv run ruff check --fix . && uv run ruff format .
Unit test failureCode regression or missing dependencyReproduce locally; see testing skill
CPU config checks fails (on a PR, the rest of the run is cancelled)A recipe config, test-suite list or nightly GPU-hour budget check failed (tests/unit/test_recipes_and_test_suites.py, tests/unit/test_config_validation.py)Reproduce on Linux (the lockfile has no macOS wheels) with cd tests && RAY_ENABLE_UV_RUN_RUNTIME_ENV=0 HF_HOME=${HF_HOME:-$HOME/.cache/huggingface} uv run --group test pytest unit/test_recipes_and_test_suites.py unit/test_config_validation.py; the job runs on a GitHub-hosted CPU runner with these two variables set

Re-running CI

To retry a failed run on the same commit, re-run only the failed jobs:

gh run rerun <run-id> --failed --repo NVIDIA-NeMo/RL

In the UI this is Re-run jobs → Re-run failed jobs. It keeps every job that already passed and also re-runs jobs that were cancelled or skipped because of a failed job, including a run cancelled by a failing CPU config checks job.

Rules for agents:

  • Never run gh run rerun <run-id> without --failed, and never suggest Re-run all jobs. A full re-run repeats every GPU job on a commit that already passed most of them.
  • Read the failure first (gh run view <run-id> --log-failed). Re-run only when the failure is unrelated to the change: a known flaky test, a download or network error, a runner or container problem.
  • If the failure comes from the change, fix it and push. A new commit needs a new /ok to test <full-sha> comment; do not re-run the old commit.
  • Do not push empty commits to re-trigger CI; use --failed on the existing run.

Plus de skills de nvidia

accelerated-computing-cudf
nvidia
Guide officiel rédigé par NVIDIA pour les DataFrames GPU NVIDIA cuDF, l'accélération pandas, dask-cuDF, ETL, les jointures, groupby, les entrées/sorties CSV/Parquet, la sémantique nullable, et…
accessibility
nvidia
Workflow unifié d’audit d’accessibilité couvrant l’analyse statique, les tests d’exécution, les modèles ARIA, la navigation au clavier et le contraste des couleurs. Utilisez cette compétence…
accessing-mlflow
nvidia
Interroger et parcourir les résultats d'évaluation stockés dans MLflow. Utiliser lorsque l'utilisateur souhaite rechercher des exécutions par ID d'invocation, comparer des métriques entre modèles, récupérer des artefacts…
add-binding-feature
nvidia
Ajouter ou modifier une surface d'API publique NeMo Relay à travers le runtime central et chaque binding affecté
add-middleware
nvidia
Ajouter un nouveau type de garde-fou ou d'interception au pipeline middleware NeMo Relay
aicr-analyzing-snapshots
nvidia
À utiliser lors de l'analyse d'un fichier YAML de snapshot AICR, de l'examen de l'état du cluster, de la comparaison des caractéristiques des fournisseurs, de l'extraction d'informations sur la topologie GPU/réseau, ou…
aicr-auditing-docs
nvidia
À utiliser lors de la révision de la documentation Markdown d'AICR pour détecter les doublons, les dérives, l'enflure et les lacunes — afin de maintenir des documents à forte valeur ajoutée à mesure que le projet évolue. Se déclenche sur « audit…
aicr-creating-guided-demos
nvidia
Génère un script de démonstration guidée interactive (demos/*.sh), en direct ou à son rythme, avec le modèle Frame → Tell → Show → Close. Se déclenche sur « script de démonstration », « guidé…