Skip to content

Notebooks CI: refresh the Colab oracle snapshots to the current GPU runtime - #14182

Merged
danielhanchen merged 3 commits into
mainfrom
fix/refresh-colab-oracle
Oct 19, 2026
Merged

danielhanchen merged 3 commits into
mainfrom
fix/refresh-colab-oracle

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Summary

The scheduled Notebooks CI run on main fails static + transitive resolve (cron / dispatch only), in its Diff Colab oracle vs committed snapshots (--strict on cron) step. It has failed on every scheduled run since at least 2026-09-27, most recently 2026-10-18 (run 39104836103):

=== pip-freeze.gpu.txt: upstream=720 snapshot=699 diff=226 (new=54 removed=33 changed=139) ===
=== apt-list-gpu.txt: upstream=1163 snapshot=1160 diff=241 (new=60 removed=57 changed=124) ===
=== os-info-gpu.txt: upstream=4 snapshot=4 diff=1 (new=0 removed=0 changed=1) ===
##[error]A rule-bearing Colab oracle drifted from its committed snapshot; run `notebook_validator.py refresh-colab --all --snapshot-dir scripts/data` to acknowledge.

Colab moved to a new GPU runtime, and the step exists to make someone acknowledge that. Nothing in Unsloth is wrong. The committed snapshots are just behind.

Change

python scripts/notebook_validator.py refresh-colab --all --snapshot-dir scripts/data, as the step asks. The three snapshot files move to the current runtime. The parts the rules and the smoke seed read:

before after
torch / torchvision / torchaudio 2.11.0 / 0.26.0 / 2.11.0 +cu128 same versions, +cu130
torchcodec 0.11.0+cu128 0.11.0+cu130
transformers 5.16.1 5.18.0
huggingface_hub 1.29.0 1.33.0
OS Ubuntu 24.04.1 LTS Ubuntu 24.04.4 LTS

CPU skip list (colab_to_cpu_pin.json)

The new runtime is CUDA 13. RAPIDS wheels moved from -cu12 to -cu13, and the CUDA 13 nvidia-* runtime wheels dropped the -cu suffix (nvidia-cublas, nvidia-cufft, ...). As a result, 28 of the old skip entries matched nothing, and the smoke seed would have installed 53 CUDA-only wheels on the CPU runners.

  • Skip list: re-derived for this freeze, 90 entries.
  • Closure: rebuilt from PyPI Requires-Dist for every pin (Linux x86_64, CPython 3.13, no extras). No retained pin requires a skipped one. torch is the only retained parent, and it is rewritten to the CPU index.

Guards (test_smoke_install_contract.py)

The old checks intersected a fixed -cu12 name list with the freeze, so after the rotation they passed vacuously. Now:

  • CUDA-only wheels are classified by name shape: -cuNN, cupy-cudaNNx, jax-cudaNN-*, nvidia-* except nvidia-ml-py, cuda-*, and triton. Each shape has its own parametrized test cases.
  • A skip entry missing from the freeze fails, which is the signal that the map was not refreshed with the snapshot.
  • The closure edge table is the real cu13 graph, and a stale edge fails.

The new freeze with the old map fails 3 of these. On main's old freeze the shape check also finds 3 CUDA wheels the old map already missed: cuda-toolkit, librmm-cu12 and libucx-cu12.

Testing

  • Snapshot contract tests: test_smoke_install_contract.py, test_validator_fixtures.py and test_notebook_validator_shell_parsing.py give 290 passed, 2 skipped on the refreshed files. After the skip-list fix, test_smoke_install_contract.py alone gives 52 passed. Those include the checks that every dev pin in the freeze is judged, the skip list is closed under the freeze's dependencies, and the CUDA-only wheels are skipped.
  • notebook_validator.py lint --colab-pin: I ran it against unslothai/notebooks@main with the old and the new freeze. Both give 86 errors and 6 warnings, on the same rules, notebooks and cells. Only version strings inside messages differ (peft==0.20.0 to 0.21.1, +cu128 to +cu130). That lint step is advisory on cron (continue-on-error), and its backlog is unchanged.
  • Seed resolve: I replayed the seed step's filter on this freeze. It produced 3 torch pins and 626 others, and none of them is a CUDA-only name. Then uv pip compile --python-version 3.13 --python-platform x86_64-manylinux_2_28 --only-binary :all: (with the map's no_binary exceptions and the CPU torch index) resolved all of them to 630 packages, with torch==2.11.0+cpu. No CUDA wheel comes back in transitively: the only nvidia name in the resolve is the pure-Python nvidia-ml-py.
  • The smoke-install matrix seeds from this freeze: Notebooks CI with include_smoke=true on this branch: run 39194401235 was dispatched on the first commit, before the skip list was fixed, so I cancelled it. Run 39201002217 is running on cf2a5fb, and I will add its result here.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T05:01:46.619712Z cf1ad20 Manual request
🔒 Security Review ⚠️ Failed 2026-10-19T03:23:25.919291Z e8d541d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e8d541d2f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

cuda-pathfinder==1.8.2
cuda-python==13.0.3
cuda-toolkit==13.0.2
cudf-cu13==26.6.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update the CPU skip map for CUDA 13 packages

When the scheduled smoke-install matrix consumes this refreshed snapshot, the seed filter in .github/workflows/notebooks-ci.yml skips exact names from colab_to_cpu_pin.json, but that mapping still lists the old *-cu12 RAPIDS/CUDA packages. Consequently cudf-cu13 and dozens of other newly added CUDA 13 pins are written to /tmp/seed_pins.txt and installed on eight CPU-only runners, defeating the dependency-closure/cache-size safeguards and likely exhausting the 12-minute bulk-install or 8-minute fallback budgets. Refresh the skip mapping and its closure alongside this snapshot.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, fixed in cf2a5fb. The refreshed freeze renames the RAPIDS wheels from -cu12 to -cu13, and the CUDA 13 nvidia-* runtime wheels no longer carry a -cu suffix (nvidia-cublas, nvidia-cufft, ...). As a result, 28 of the old skip entries matched nothing and 53 CUDA-only pins would have gone to the CPU runners.

  • Skip list: re-derived for this freeze, 90 entries. The closure was rebuilt from PyPI Requires-Dist for every pin (Linux x86_64, CPython 3.13, no extras): no retained pin requires a skipped one. torch is the only retained parent, and it is rewritten to the CPU index.
  • Guards: the old ones intersected a fixed -cu12 name list with the freeze, so they passed vacuously after the rotation. Now:
    • CUDA-only wheels are classified by name shape, which covers -cuNN, cupy-cudaNNx, jax-cudaNN-, nvidia- except nvidia-ml-py, cuda-*, and triton.
    • Any skip entry missing from the freeze fails, and so does a stale closure edge.
  • Sabotage check: the new freeze with the old map fails 3 tests. The pattern check also found that main's map already missed cuda-toolkit, librmm-cu12 and libucx-cu12 on the old freeze.

The refreshed freeze moved RAPIDS from -cu12 to -cu13 and the nvidia-*
runtime wheels dropped their -cu suffix, so the old skip list matched none
of them and the seed would install every CUDA 13 wheel on the CPU runners.
Re-derived the list and its dependency closure from PyPI metadata for this
freeze (no retained pin requires a skipped one).

The guards checked fixed -cu12 names intersected with the freeze, so they
passed vacuously. CUDA-only wheels are now classified by name shape, a skip
entry missing from the freeze fails, and so does a stale closure edge.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: cf2a5fbc8d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: cf1ad20abd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 4dc8bf0 into main Oct 19, 2026
@danielhanchen
danielhanchen deleted the fix/refresh-colab-oracle branch October 19, 2026 05:06
danielhanchen added a commit that referenced this pull request Nov 1, 2026
…untime (#16373)

## Summary

The scheduled `Notebooks CI` run on main fails `static + transitive
resolve (cron / dispatch only)` in its `Diff Colab oracle vs committed
snapshots (--strict on cron)` step. It has failed on every scheduled run
since at least 2026-10-26, most recently 2026-11-01 (run 41280938100):

```
=== pip-freeze.gpu.txt: upstream=719 snapshot=720 diff=149 (new=0 removed=1 changed=148) ===
=== apt-list-gpu.txt: upstream=1163 snapshot=1163 diff=88 (new=2 removed=2 changed=84) ===
=== os-info-gpu.txt: upstream=4 snapshot=4 diff=1 (new=0 removed=0 changed=1) ===
  (rule-bearing key drifted: python)
##[error]A rule-bearing Colab oracle drifted from its committed snapshot; run `notebook_validator.py refresh-colab --all --snapshot-dir scripts/data` to acknowledge.
```

The Colab GPU runtime has moved on since #14182 refreshed these
snapshots on 2026-10-18. The step exists to make someone acknowledge
that. Nothing in Unsloth is wrong; the committed snapshots are behind.

## Change

`python scripts/notebook_validator.py refresh-colab --all --snapshot-dir
scripts/data`, as the step asks. Only the three snapshot files change.
The parts the rules and the smoke seed read:

| | before | after |
|---|---|---|
| Python | 3.13.15 | 3.13.16 |
| torch / torchvision / torchaudio | unchanged | unchanged |
| transformers | 5.18.0 | 5.22.0 |
| peft | 0.21.1 | 0.21.2 |
| numpy | 2.1.3 | 2.4.6 |
| antlr4-python3-runtime | 4.9.3 | removed (omegaconf 2.4.0 no longer
pulls it) |

`colab_to_cpu_pin.json` needs no change this time: no CUDA wheel was
renamed, and every skip entry is still in the freeze.
`antlr4-python3-runtime` stays in its `no_binary` list; the seed step
intersects that list with the freeze, so the entry is inert until
something brings the package back.

## Testing

- `colab-diff --strict` against the live oracle: exit 1 before the
refresh, exit 0 after.
- `tests/notebooks/test_smoke_install_contract.py`,
`test_validator_fixtures.py` and
`test_notebook_validator_shell_parsing.py`: 303 passed, 2 skipped on the
refreshed files. These include the checks that every skip entry is
present in the freeze, the skip list is closed under the freeze's
dependencies, and every CUDA-only wheel is skipped.
- `notebook_validator.py lint --colab-pin` against
`unslothai/notebooks@main` (d85d113) with the old and the new freeze:
both give 86 errors and 6 warnings on the same rules, notebooks and
cells. That lint step is advisory on cron (`continue-on-error`), and its
backlog is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant