cicd

작성자: nvidia

NeMo-RL용 CI/CD 참조 자료입니다. GitHub Actions 파이프라인 구조, /ok to test를 통한 CI 트리거, 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.

nvidia의 다른 스킬

accelerated-computing-cudf
nvidia
공식 NVIDIA 작성 NVIDIA cuDF GPU 데이터프레임, pandas 가속, dask-cuDF, ETL, 조인, groupby, CSV/Parquet I/O, nullable 의미론 등에 대한 안내
accessibility
nvidia
정적 분석, 런타임 테스트, ARIA 패턴, 키보드 탐색, 색상 대비를 아우르는 통합 접근성 감사 워크플로입니다. 이 스킬을 사용하세요…
accessing-mlflow
nvidia
MLflow에 저장된 평가 결과를 조회하고 탐색합니다. 사용자가 호출 ID로 실행을 조회하거나, 모델 간 메트릭을 비교하거나, 아티팩트를 가져오려 할 때 사용하세요.
add-binding-feature
nvidia
핵심 런타임과 영향을 받는 모든 바인딩에서 공용 NeMo Relay API 표면을 추가하거나 변경합니다.
add-middleware
nvidia
NeMo Relay 미들웨어 파이프라인에 새로운 가드레일 또는 인터셉트 유형을 추가합니다.
aicr-analyzing-snapshots
nvidia
AICR 스냅샷 YAML 파일을 분석하거나, 클러스터 상태를 검토하거나, 공급자 특성을 비교하거나, GPU/네트워크 토폴로지 인사이트를 추출할 때 사용합니다...
aicr-auditing-docs
nvidia
AICR의 Markdown 문서를 검토할 때 중복, 표류, 비대, 공백을 확인하여 프로젝트가 발전함에 따라 문서의 가치를 높게 유지하기 위해 사용합니다. "감사…"로 시작하는 트리거에 반응합니다.
aicr-creating-guided-demos
nvidia
대화형 안내 데모 스크립트(demos/*.sh)를 라이브 또는 자기 주도 방식으로 Frame → Tell → Show → Close 패턴에 따라 구조화한다. "데모 스크립트", "안내…"와 같은 표현에 반응한다.