Skip to content

Acknowledge the Colab oracle drift, and stop the diff hiding entries - #11324

Merged
danielhanchen merged 2 commits into
mainfrom
fix/acknowledge-the-colab-oracle-drift
Sep 19, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix/acknowledge-the-colab-oracle-drift

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Notebooks CI has been red on main since at least 2026-09-16, on:

A rule-bearing Colab oracle drifted from its committed snapshot; run
`notebook_validator.py refresh-colab --all --snapshot-dir scripts/data` to acknowledge.

That is the tripwire working as designed. Any drift in pip-freeze.gpu.txt is strict by construction, because the rules resolve a notebook's installs against it, and what the check asks for is an acknowledged refresh. This is one, with the diff read rather than waved through.

What moved

Oracle Drift
pip-freeze.gpu.txt 91 entries: 3 new, 1 removed, 87 changed
apt-list-gpu.txt 1261 entries (advisory)
os-info-gpu.txt Ubuntu 22.04.5 LTS to 24.04.1 LTS (advisory)

The ones worth naming: transformers 5.15.0 -> 5.16.1, datasets 4.0.0 -> 4.8.5, jax 0.7.2 -> 0.11.1, fsspec 2025.3.0 -> 2025.12.0, huggingface_hub 1.27.0 -> 1.29.0, diffusers 0.39.0 -> 0.40.0. torch did not move, and neither did the Python 3.13.15 line, which is why only the pip oracle tripped --strict.

Why acknowledging is safe

Linting all 445 notebooks in unslothai/notebooks at HEAD against the old oracle and the new one gives the same 82 findings: 0 new, 0 resolved. This is upstream churn that no rule resolves differently, not a compatibility change being papered over.

(Those 82 findings are the pre-existing state of the notebooks repo under lint --no-pypi on this box. They are identical on both sides and this PR neither creates nor fixes any of them.)

Robustification

A defect this drift exposed. colab-diff caps its lists at 50 / 50 / 80 and elides the remainder with a bare count, so reading the output for whether a given package moved can give the wrong answer: transformers 5.15.0 -> 5.16.1 sat past the CHANGED cap and the package read as untouched. Every entry in the pip oracle is rule-bearing, so an elided one is exactly what a reviewer may be deciding on.

Added --full, and the elision now names it rather than leaving it to be guessed at:

...and 7 more changed entries (--full to list them)

Two tests cover both halves, capped and full. Removing the flag's effect fails both.

Verification

  • colab-diff --strict exits 0 after the refresh, 1 before it.
  • tests/notebooks: 314 passed, 2 skipped.
  • The before/after lint comparison above, over all 445 notebooks.

Not addressed here

The same workflow's nine smoke install (Colab-shaped venv, opt-in) jobs also failed in that run. Their logs have expired, so I have not diagnosed them, and this change does not claim to fix them. If they are still failing after the next cron, they want their own look with fresh logs.

Notebooks CI has been red since at least 2026-09-16 on

    A rule-bearing Colab oracle drifted from its committed snapshot; run
    `notebook_validator.py refresh-colab --all --snapshot-dir scripts/data`
    to acknowledge.

That is the tripwire working: any drift in pip-freeze.gpu.txt is strict by
construction, because the rules resolve a notebook's installs against it. What
it wants is an acknowledged refresh, so this is one, with the diff read rather
than waved through.

What moved: 91 pip entries (3 new, 1 removed, 87 changed), notably
transformers 5.15.0 -> 5.16.1 and datasets 4.0.0 -> 4.8.5; the base image from
Ubuntu 22.04.5 to 24.04.1; 1261 apt entries. torch did not move, and neither
did the Python line, which is why only the pip oracle tripped --strict.

The evidence that acknowledging is safe: linting all 445 notebooks in
unslothai/notebooks against the old and the new oracle gives the same 82
findings, 0 new and 0 resolved. This is upstream churn no rule resolves
differently, not a compatibility change being papered over.

Robustification, from a defect this drift exposed. colab-diff caps its lists at
50/50/80 and elides the rest with a bare count, and transformers 5.15.0 ->
5.16.1 sat past the CHANGED cap -- reading the output, that package looked
untouched. Every entry in the pip oracle is rule-bearing, so an elided one is
exactly what a reviewer may be deciding on. Added --full, and the elision now
names it instead of leaving it to be guessed at. Two tests cover both halves;
removing the flag's effect fails both. tests/notebooks: 314 passed, 2 skipped.

Not addressed here: the nine "smoke install (Colab-shaped venv, opt-in)" jobs
in the same workflow also failed. Their logs have expired, so I have not
diagnosed them and this change does not claim to fix them.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 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-09-19T06:41:54.730480Z 098fe2b Manual request
🔒 Security Review ✅ Completed 2026-09-19T06:43:35.415370Z 098fe2b Manual request
ℹ️ 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

Copy link
Copy Markdown

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

Reviewed commit: 098fe2bbf9

ℹ️ 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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 098fe2bbf9

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@danielhanchen
danielhanchen merged commit 6f8df52 into main Sep 19, 2026
29 checks passed
@danielhanchen
danielhanchen deleted the fix/acknowledge-the-colab-oracle-drift branch September 19, 2026 07:04
danielhanchen added a commit that referenced this pull request Sep 19, 2026
* Strip distro .devN markers from the Colab pins

My own regression, from the oracle refresh in #11324. I dispatched the smoke
matrix on main to confirm the torchcodec fix and all eight legs failed earlier
than before, in 'Install Colab-shaped venv':

    ERROR: No matching distribution found for mako==1.3.2.dev0

The Colab image moved to Ubuntu 24.04 in this rotation, and its Mako is the
distro build, which labels itself 1.3.2.dev0. PyPI has 1.3.2 and never had
1.3.2.dev0. The freeze is a snapshot of an image, so it records versions as the
image labels them; the seed already strips a local version (+cu128) for exactly
this reason and had nothing for .devN. One unresolvable pin fails the bulk
resolve for all 690 of them.

Strip the marker to the base version rather than skipping the package: the image
really does carry Mako, and skipping would quietly shrink the venv this job
exists to reproduce.

Two tests, both replaying the seed's own transformation: no seeded pin may carry
a .dev or + marker PyPI cannot resolve, and a package whose marker was stripped
must still be pinned rather than dropped. Removing the strip fails both, the
first naming mako==1.3.2.dev0 exactly as CI did.

tests/notebooks: 324 passed, 2 skipped.

Not verified here: this box cannot run the smoke matrix. The failure and the
version list PyPI offered both come from the dispatched run on main
(35432057179), and the fix is checked against the committed snapshot rather
than against a resolve.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rewrite the distro pin by name, and test the workflow's own seed script

Two defects, both reported, both real.

The blind strip was wrong. .devN is also a genuine PEP 440 prerelease, and
rewriting it by pattern would turn a real pkg==2.0.dev3 into pkg==2.0, a
different release that may not exist and is not what the image had. Mako is a
distro anomaly, not a rule. It now goes through an explicit
distro_dev_version entry keyed on the exact (package, recorded version), so a
pin nobody has judged passes through untouched and fails the resolve loudly,
where a human decides.

The tests were worse: they re-implemented the seed transform, so deleting the
rewrite from the workflow left both of them green. The regression they exist to
catch was not guarded at all, and the sabotage I ran to 'prove' them removed
the strip from the test helper rather than from the workflow, so it proved
nothing. They now lift the seed heredoc out of the workflow and execute it, with
only the output paths redirected and the snapshot's python_version set to the
running interpreter -- that guard is about the snapshot matching the runner and
has its own test.

Sabotage against the workflow this time. Removing the rewrite fails both pin
tests, naming mako==1.3.2.dev0 exactly as CI did; putting the blind pattern
strip back fails the new test that an undeclared .devN pin is left alone.

tests/notebooks: 325 passed, 2 skipped.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Scope the marker assertion to declared rewrites, not to .devN as a shape

The assertion I added contradicted the test beside it. One deliberately injects
an undeclared pkg==2.0.dev3 and requires the seed to preserve it; the other
rejected every seeded .devN. A future snapshot carrying a genuine published
prerelease would satisfy the design and fail the suite, pushing a valid pin
towards being rewritten or suppressed for no reason.

Check the versions declared in distro_dev_version instead: a pin that still
carries a declared "from" version is one the rewrite failed to apply, which is
the actual regression. Local versions stay a blanket check, because the seed
strips +cu128 from every pin whatever the package, so any survivor there is a
defect.

Still catches the real thing: removing the rewrite from the workflow fails it
with ['mako==1.3.2.dev0']. And a freeze carrying some-real-pkg==2.0.dev3 now
passes, with the prerelease preserved.

tests/notebooks: 325 passed, 2 skipped.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Judge every .devN pin from the freeze, so losing the mapping fails loudly

Scoping the checks to what distro_dev_version declares left a hole I put there:
delete or misspell that key and the declared set is empty, so the marker test
passes vacuously and the rewrite test skips, while the seed hands pip the
unresolvable Mako==1.3.2.dev0 and every leg of the matrix dies exactly as it
did. A green suite over the original regression.

Read the requirement from the FREEZE instead, which is what the image actually
has. Every .devN entry must be judged one way or the other: a distro label with
a distro_dev_version rewrite, or a prerelease upstream really published, listed
under the new published_prerelease key and passed through untouched. Neither
answer is derivable from the version string, so a new one fails until a person
says which it is.

Deleting distro_dev_version now fails, and so does misspelling it, which is the
case that would otherwise have been silent.

tests/notebooks: 326 passed, 2 skipped.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
…nslothai#11324)

* Acknowledge the Colab oracle drift, and stop the diff hiding entries

Notebooks CI has been red since at least 2026-09-16 on

    A rule-bearing Colab oracle drifted from its committed snapshot; run
    `notebook_validator.py refresh-colab --all --snapshot-dir scripts/data`
    to acknowledge.

That is the tripwire working: any drift in pip-freeze.gpu.txt is strict by
construction, because the rules resolve a notebook's installs against it. What
it wants is an acknowledged refresh, so this is one, with the diff read rather
than waved through.

What moved: 91 pip entries (3 new, 1 removed, 87 changed), notably
transformers 5.15.0 -> 5.16.1 and datasets 4.0.0 -> 4.8.5; the base image from
Ubuntu 22.04.5 to 24.04.1; 1261 apt entries. torch did not move, and neither
did the Python line, which is why only the pip oracle tripped --strict.

The evidence that acknowledging is safe: linting all 445 notebooks in
unslothai/notebooks against the old and the new oracle gives the same 82
findings, 0 new and 0 resolved. This is upstream churn no rule resolves
differently, not a compatibility change being papered over.

Robustification, from a defect this drift exposed. colab-diff caps its lists at
50/50/80 and elides the rest with a bare count, and transformers 5.15.0 ->
5.16.1 sat past the CHANGED cap -- reading the output, that package looked
untouched. Every entry in the pip oracle is rule-bearing, so an elided one is
exactly what a reviewer may be deciding on. Added --full, and the elision now
names it instead of leaving it to be guessed at. Two tests cover both halves;
removing the flag's effect fails both. tests/notebooks: 314 passed, 2 skipped.

Not addressed here: the nine "smoke install (Colab-shaped venv, opt-in)" jobs
in the same workflow also failed. Their logs have expired, so I have not
diagnosed them and this change does not claim to fix them.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
* Strip distro .devN markers from the Colab pins

My own regression, from the oracle refresh in unslothai#11324. I dispatched the smoke
matrix on main to confirm the torchcodec fix and all eight legs failed earlier
than before, in 'Install Colab-shaped venv':

    ERROR: No matching distribution found for mako==1.3.2.dev0

The Colab image moved to Ubuntu 24.04 in this rotation, and its Mako is the
distro build, which labels itself 1.3.2.dev0. PyPI has 1.3.2 and never had
1.3.2.dev0. The freeze is a snapshot of an image, so it records versions as the
image labels them; the seed already strips a local version (+cu128) for exactly
this reason and had nothing for .devN. One unresolvable pin fails the bulk
resolve for all 690 of them.

Strip the marker to the base version rather than skipping the package: the image
really does carry Mako, and skipping would quietly shrink the venv this job
exists to reproduce.

Two tests, both replaying the seed's own transformation: no seeded pin may carry
a .dev or + marker PyPI cannot resolve, and a package whose marker was stripped
must still be pinned rather than dropped. Removing the strip fails both, the
first naming mako==1.3.2.dev0 exactly as CI did.

tests/notebooks: 324 passed, 2 skipped.

Not verified here: this box cannot run the smoke matrix. The failure and the
version list PyPI offered both come from the dispatched run on main
(35432057179), and the fix is checked against the committed snapshot rather
than against a resolve.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Rewrite the distro pin by name, and test the workflow's own seed script

Two defects, both reported, both real.

The blind strip was wrong. .devN is also a genuine PEP 440 prerelease, and
rewriting it by pattern would turn a real pkg==2.0.dev3 into pkg==2.0, a
different release that may not exist and is not what the image had. Mako is a
distro anomaly, not a rule. It now goes through an explicit
distro_dev_version entry keyed on the exact (package, recorded version), so a
pin nobody has judged passes through untouched and fails the resolve loudly,
where a human decides.

The tests were worse: they re-implemented the seed transform, so deleting the
rewrite from the workflow left both of them green. The regression they exist to
catch was not guarded at all, and the sabotage I ran to 'prove' them removed
the strip from the test helper rather than from the workflow, so it proved
nothing. They now lift the seed heredoc out of the workflow and execute it, with
only the output paths redirected and the snapshot's python_version set to the
running interpreter -- that guard is about the snapshot matching the runner and
has its own test.

Sabotage against the workflow this time. Removing the rewrite fails both pin
tests, naming mako==1.3.2.dev0 exactly as CI did; putting the blind pattern
strip back fails the new test that an undeclared .devN pin is left alone.

tests/notebooks: 325 passed, 2 skipped.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Scope the marker assertion to declared rewrites, not to .devN as a shape

The assertion I added contradicted the test beside it. One deliberately injects
an undeclared pkg==2.0.dev3 and requires the seed to preserve it; the other
rejected every seeded .devN. A future snapshot carrying a genuine published
prerelease would satisfy the design and fail the suite, pushing a valid pin
towards being rewritten or suppressed for no reason.

Check the versions declared in distro_dev_version instead: a pin that still
carries a declared "from" version is one the rewrite failed to apply, which is
the actual regression. Local versions stay a blanket check, because the seed
strips +cu128 from every pin whatever the package, so any survivor there is a
defect.

Still catches the real thing: removing the rewrite from the workflow fails it
with ['mako==1.3.2.dev0']. And a freeze carrying some-real-pkg==2.0.dev3 now
passes, with the prerelease preserved.

tests/notebooks: 325 passed, 2 skipped.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Judge every .devN pin from the freeze, so losing the mapping fails loudly

Scoping the checks to what distro_dev_version declares left a hole I put there:
delete or misspell that key and the declared set is empty, so the marker test
passes vacuously and the rewrite test skips, while the seed hands pip the
unresolvable Mako==1.3.2.dev0 and every leg of the matrix dies exactly as it
did. A green suite over the original regression.

Read the requirement from the FREEZE instead, which is what the image actually
has. Every .devN entry must be judged one way or the other: a distro label with
a distro_dev_version rewrite, or a prerelease upstream really published, listed
under the new published_prerelease key and passed through untouched. Neither
answer is derivable from the version string, so a new one fails until a person
says which it is.

Deleting distro_dev_version now fails, and so does misspelling it, which is the
case that would otherwise have been silent.

tests/notebooks: 326 passed, 2 skipped.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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