unsloth/scripts
Daniel Han 420f588205 ci(notebooks): diff Colab oracle against committed snapshots
Extend notebook_validator.py with a colab-diff subcommand that
fetches three files from googlecolab/backend-info:

  pip-freeze.gpu.txt   -> snapshot at scripts/data/colab_pip_freeze.gpu.txt
  apt-list-gpu.txt     -> snapshot at scripts/data/colab_apt_list.gpu.txt
  os-info-gpu.txt      -> snapshot at scripts/data/colab_os_info.gpu.txt

Each file is parsed with a format-specific parser (pip ==, apt
listing, free-form os-info) and compared against the committed
snapshot. The diff reports NEW / REMOVED / CHANGED keys per file.

Wired into Notebooks CI two ways:
- PR-time static job: advisory step (continue-on-error: true) so
  upstream Colab rotations surface in the PR check UI without
  blocking authors.
- Daily static-with-pypi cron: --strict step so backend-info drift
  fails the cron within ~24h and the maintainer can refresh the
  snapshots intentionally.

Catches the same bug classes the existing R-INST-002/003/004/005
rules catch, but earlier: when Colab bumps libcudnn / Python /
torch wheels, we hear about it before a notebook breaks.

Add baseline snapshots from current backend-info HEAD: 1136 apt
packages, 4 os-info entries, 720 pip-freeze entries.
2026-05-08 11:39:38 +00:00
..
data ci(notebooks): diff Colab oracle against committed snapshots 2026-05-08 11:39:38 +00:00
enforce_kwargs_spacing.py Formatting & bug fixes (#3563) 2025-11-07 06:00:22 -08:00
install_gemma4_mlx.sh Move gemma4 script (#4994) 2026-04-12 23:41:15 -07:00
install_qwen3_6_mlx.sh Add qwen3.6 script (#5084) 2026-04-17 01:21:30 -07:00
notebook_to_python.py scripts: harden github_blob_to_raw against substring URL spoofing 2026-05-08 02:43:47 +00:00
notebook_validator.py ci(notebooks): diff Colab oracle against committed snapshots 2026-05-08 11:39:38 +00:00
run_ruff_format.py Formatting & bug fixes (#3563) 2025-11-07 06:00:22 -08:00
scan_packages.py [pre-commit.ci] auto fixes from pre-commit.com hooks 2026-05-06 23:56:54 +00:00