Skip to content

Commit 9212f4f

Browse files
[ci] make GPU validation change-aware (#1747)
1 parent 6388db8 commit 9212f4f

89 files changed

Lines changed: 3137 additions & 935 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/ci-runner/SKILL.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
name: ci-runner
3+
description: Work on FastVideo's Slurm-only, change-aware GPU CI lanes, static Buildkite graph, trusted ci-runner policy, lane scripts, and GB200 validation.
4+
---
5+
6+
# Slinky Slurm CI lanes
7+
8+
FastVideo's `ci-runner` Buildkite queue is the control plane for all active
9+
GPU CI. A private host-owned dispatcher leases GPUs from the Slinky Slurm tray
10+
and runs the immutable PR SHA inside an isolated Enroot container. Buildkite
11+
pipeline upload and Slurm submission occur on the login plane; every test
12+
payload executes on Slurm compute.
13+
14+
The files under `fastvideo/tests/modal/` and `.buildkite/scripts/pr_test.sh`
15+
are dormant rollback code. Never add an active Buildkite or slash-command
16+
route to them. `pr_test.sh` must continue to reject Buildkite invocations.
17+
18+
The private operator bundle is deliberately outside this repository because
19+
it contains site paths and credentials. See
20+
`docs/contributing/ci_architecture.md`; this skill covers the repository half
21+
and the coordination contract with that bundle.
22+
23+
## Invariants
24+
25+
- `.buildkite/pipeline.yml` contains exactly one static step for every active
26+
GPU lane. Each step pins a unique key and label, a 90-minute timeout, the
27+
trusted `/opt/fastvideo-ci-runner/run-ci` command (`run-unit` is the one
28+
compatibility wrapper), step-level internal `TEST_TYPE`, and
29+
`queue: "ci-runner"`.
30+
- Active CI contains no `pr_test.sh` command, Modal invocation, default queue,
31+
Buildkite plugin, `soft_fail`, or job-controlled artifact glob.
32+
- The six Fastcheck lanes use `:microscope:` labels. Full-Suite-only lanes use
33+
`:test_tube:` or `:bar_chart:` so direct reruns update the right aggregate.
34+
- SSIM and vanilla training request all four GPUs. Keep both in the
35+
`fastvideo/slinky/whole-tray` Buildkite concurrency group with a limit of one
36+
so the second job does not consume an agent or command timeout while waiting
37+
for the same tray.
38+
- `/test full` schedules all twenty lanes. `/merge`, `ready`, and new pushes to
39+
ready PRs use the trusted base-branch planner in
40+
`.github/scripts/plan_merge_ci.py`: automatic Fastcheck remains the universal
41+
six-lane baseline, and the merge build adds only path-relevant integration
42+
lanes. Unknown source/build paths fail closed to all fourteen additive lanes.
43+
The trusted uploader still normalizes and validates the complete static graph
44+
before Buildkite evaluates its plan conditions.
45+
- Focused merge builds may pass allowlisted golden-gate and SSIM test basenames.
46+
The private host validates the lane plan and basenames before staging them,
47+
and the in-container scripts validate them again. Direct `/test ssim`,
48+
explicit `/test full`, and the weekly main-branch schedule run the complete
49+
SSIM matrix.
50+
- The trusted uploader serves exactly three entry pipelines:
51+
`pr-fastcheck` for automatic PR builds, `ci` for slash-command/ready-label
52+
API builds, and `fastvideo-performance-lane` for the weekly schedule. Keep
53+
incoming GitHub webhook processing disabled on `ci` so it cannot duplicate
54+
`pr-fastcheck` on every PR update.
55+
- Test payloads live in `.buildkite/scripts/unit_test.sh` or executable
56+
`.buildkite/scripts/lanes/<lane>.sh`. Backend policy (GPU count, extras,
57+
secrets, kernel build, artifacts) stays in the agent-owned lane table.
58+
- Tests must preserve an inherited `MASTER_PORT`. Packed containers share the
59+
tray network namespace, so the private runner assigns a distinct port range
60+
per GPU lease and the SSIM scheduler assigns task offsets within its range.
61+
- The ARM64 runner image includes the pinned FA4 CuTe overlay validated on
62+
GB200. Keep SSIM at `FASTVIDEO_FA4=1` because its references were seeded with
63+
FA4; keep lanes with FA2 baselines at `FASTVIDEO_FA4=0`. A runner image change
64+
must revalidate both the FA4 import and an actual GB200 forward kernel.
65+
- `fastvideo/tests/ssim/ci_runner.py` is the active four-GPU SSIM scheduler.
66+
New SSIM files are discovered through `REQUIRED_GPUS` and
67+
`*_MODEL_TO_PARAMS`; do not wire them through the dormant Modal scheduler.
68+
- The host policy fail-closes unknown tuples. A repository-side lane change is
69+
inert until the operator updates the private lane table and uploader policy
70+
in the same rollout.
71+
72+
## Adding or changing a lane
73+
74+
1. Read the closest `AGENTS.md` and the domain-specific testing guide.
75+
2. Add or update the executable lane payload under `.buildkite/scripts/`.
76+
Keep it deterministic and free of host-specific paths or credential fetches.
77+
3. Add the static pipeline step and canonical `/test <name>` mapping. Keep the
78+
`<name>-ci` alias only when compatibility requires it.
79+
4. Add its source/test path ownership to `.github/scripts/plan_merge_ci.py`.
80+
Prefer the narrowest correctness-preserving lane set; leave unknown paths
81+
fail-closed. Extend `fastvideo/tests/contract/test_ci_test_collection.py`,
82+
`test_merge_ci_plan.py`, and focused CPU-only scheduler/policy tests.
83+
5. Coordinate the private lane row: GPU count (1-4), wall time, script, scope
84+
pairs, step key, command, HF cache/token, tracking mode, extras, attention
85+
backend policy, kernel policy, and artifact relay. Active training lanes
86+
keep W&B offline and do not stage a W&B credential.
87+
6. Update the trusted pipeline-uploader schema. A mismatch must reject the
88+
pipeline rather than silently skip a lane.
89+
7. Run `pre-commit run --files <changed paths>`, the planner's representative
90+
diff matrix, contract tests, private driver tests, and a real GB200 canary.
91+
Multi-GPU, hardware-reference, training, performance, and SSIM changes need
92+
their own target-hardware evidence.
93+
94+
## Rollback
95+
96+
Rollback the Slurm routing/configuration change or pause the `ci-runner` queue.
97+
Do not silently reactivate Modal. A manual Modal experiment requires the
98+
explicit local opt-in documented in `ci_architecture.md`; returning it to
99+
production CI needs a separate reviewed decision.

.agents/skills/reseed-ssim-references/SKILL.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: reseed-ssim-references
3-
description: Re-seed HF reference videos for a single existing SSIM test on Modal L40S. Always backs up current refs locally first, regenerates on Modal, pauses for the user to eyeball before-vs-after quality, then overwrites the targeted `<model_id>` subtree on `FastVideo/ssim-reference-videos` with `--force`. Use when an intentional code change (model port fix, attention backend swap, kernel upgrade, hyperparameter change) has invalidated existing refs and they need to be regenerated. Pairs with `seed-ssim-references`, which is for first-time seeding only.
3+
description: Re-seed HF reference videos for a single existing SSIM test on Modal L40S. Always backs up current refs locally first, regenerates on Modal, pauses for the user to eyeball before-vs-after quality, then overwrites the targeted model subtree on `FastVideo/ssim-reference-videos` with `--force`. Use when an intentional code change (model port fix, attention backend swap, kernel upgrade, hyperparameter change) has invalidated existing refs and they need to be regenerated. Pairs with `seed-ssim-references`, which is for first-time seeding only.
44
---
55

66
# Re-seed SSIM Reference Videos
@@ -13,7 +13,7 @@ on HF — the old refs are overwritten — so the skill always:
1313

1414
1. Confirms intent with a one-liner the user has to type.
1515
2. Downloads the existing refs as a local, timestamped backup.
16-
3. Regenerates on Modal L40S (same code path that CI uses).
16+
3. Regenerates through the manual legacy Modal L40S maintenance path.
1717
4. Pauses for a side-by-side eyeball of backup vs new mp4s.
1818
5. Uploads with `--force`, scoped to the single `--model-id`.
1919
6. Reminds the user to keep the backup until the PR lands.
@@ -51,8 +51,9 @@ harder to recover from than failing closed.
5151

5252
Hardcoded:
5353

54-
- Modal GPU: **L40S** (matches CI; re-seeding from another SKU produces refs
55-
that L40S CI cannot match).
54+
- Modal GPU: **L40S**. This is a manual reference-maintenance target, not the
55+
active Slurm CI compute path; changing the SKU also changes the historical
56+
`L40S_reference_videos` contract.
5657
- Quality tier: **`default`**. `full_quality` is a separate, deliberate
5758
operation.
5859
- HF repo: `FastVideo/ssim-reference-videos` (override via

.agents/skills/seed-ssim-references/SKILL.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ The skill is run **manually**, once per new test. Before invoking it, the user
3535
has already sanity-tested the new test locally — it launches `VideoGenerator`
3636
and writes an artefact without crashing (the missing-reference assertion at
3737
the end is expected). The skill does not re-test locally; it goes straight
38-
to Modal L40S (which is what CI uses).
38+
to the manual legacy Modal L40S reference-maintenance target. Active CI runs
39+
on the Slinky Slurm cluster and only consumes the resulting references.
3940

4041
## When to use
4142

@@ -61,7 +62,8 @@ Prompt the user for it if they didn't supply it.
6162

6263
Everything else is fixed:
6364

64-
- Modal runner GPU: **L40S** (hardcoded in `fastvideo/tests/modal/ssim_test.py`).
65+
- Modal maintenance GPU: **L40S** (hardcoded in
66+
`fastvideo/tests/modal/ssim_test.py`; this is not the active CI compute path).
6567
- Device folder: `L40S_reference_videos`.
6668
- Quality tier: `default` (the tier CI runs). The `full_quality` tier is not
6769
seeded by this skill.

0 commit comments

Comments
 (0)