Re-lock every notebook for Colab's Python 3.13 runtime - #206
Merged
Conversation
Colab moved its default runtime to Python 3.13 on 2026-08-19, and the install cells pinned against the 3.12 runtime stopped resolving there: ml-dtypes on 3.13 requires numpy>=2.1, and numpy 2.0.2 has no cp313 wheels, so 34 of the 35 pin sets failed at the first cell. This refreshes the Colab constraint file from the current runtime, switches the locker, the Dockerfile base, and the CI runners to 3.13, and re-locks all 44 bootstrap notebooks. The re-lock is driven by requirements.in files, so every group now has one: the 29 groups that predated the contract get theirs from a new backfill script that scans the notebooks' imports, resolves them to distribution names inside the group's published image, and carries over NWB extension packages and git pins that an import scan cannot see. Groups that use pynwb are held at pynwb<4 and hdmf<5 so that the re-lock does not double as a pynwb major upgrade; the demos notebook keeps the nwbwidgets-era stack. The Get-to-know-a-Dandiset tutorial had five outputs with an invalid key that made the notebook fail nbformat validation; they are removed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Contributor
|
Preview for this PR has been removed (PR closed). |
Contributor
…-lock The first CI round on the 3.13 re-lock failed 22 notebooks. Fourteen of those were artifacts of the kernel execution path added in #205 rather than of the re-lock: nbconvert starts the kernel in the directory of the notebook file it is given, which was our temporary copy under /tmp, so helper modules and relative data paths next to the original notebook were not found; and tqdm.auto raises "IProgress not found" inside a kernel when ipywidgets is missing, which Colab preinstalls and our runner did not. The temporary copy now lives beside the original, and ipywidgets is installed with the harness in kernel mode. The remaining eight were real drift that the old locks had masked: pynapple 0.11 removed compute_perievent_continuous and the tref kwarg, numcodecs 0.16 removed blosc.cbuffer_sizes (used by lindi), and pynwb 3.1 rejects object names containing "/" that the 001038 and 001084 files carry. Each gets an upper bound in its requirements.in. Holding pynwb below 3.1 in turn needs a dandi release that wants click<8.2, which conflicts with Colab's click pin, so lock_notebook.py now honours "# override: <spec>" lines in requirements.in that replace the Colab constraint for a single package. The MICrONS notebook drops its nwbwidgets cell, since that package forces a pynwb the server-side dandi version check no longer accepts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN
…sts on DANDI cellpose 4 removed models.Cellpose and nemos 0.2.7 changed the solver kwargs the GLM notebook passes, so both get upper bounds at the versions the notebooks were written against. The processed widefield notebook hardcoded a subject that is not in the dandiset, and the anatomical one defaulted to a local path; both now stream sub-FD-28 from DANDI. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN
…on DANDI yet optimistix 0.1.0 does not work with the jax 0.7.2 that Colab pins, so the GLM notebook is held at the 0.0.11 it was written against. The processed and anatomical widefield notebooks need an atlas registration that the only published 001712 session does not contain, so they are excluded from CI and from the Colab badge until the data catches up. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN
…shes The checklist comment was assembled once, after the whole matrix had run, so on a PR that touches many notebooks nothing was visible for an hour. Each matrix job now deploys its own rendered notebook to the PR preview through the Contents API (one file per commit, retried on a concurrent commit, so jobs never race on a git push) and rebuilds the checklist. The checklist is derived from the run's artifact names, which carry the result (executed-<slug>-pass/fail/none), so concurrent rebuilds cannot lose a result; a final job rebuilds it once more after the matrix. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…ysis_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…ebook_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…e_figure1d_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…torial_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…ce_tuning_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…c_excitability_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…_notebook_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…ndiset_ipynb for PR #206
github-actions Bot
added a commit
that referenced
this pull request
Aug 23, 2026
…e_figure_S1_ipynb for PR #206
…group Committing each executed notebook to gh-pages straight from the matrix job bypassed the gh-pages-deploy concurrency group, and the first run rejected the index preview's push. Each matrix job now dispatches a small deploy workflow instead; it runs in that group, publishes every executed notebook the run has produced so far with peaceiris, and rebuilds the checklist. The finalize job does the same once the matrix is complete, so the end state does not depend on the dispatches, which resolve the workflow file on the default branch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN
This was referenced Aug 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Colab switched its default runtime to Python 3.13 on 2026-08-19 (the runtime now reports
3.13.15 (main, Aug 6 2026)). Our install cells were compiled against the 3.12 runtime, and 34 of the 35 pin sets stopped resolving there:ml-dtypeson 3.13 requiresnumpy>=2.1, and the pinnednumpy==2.0.2has no cp313 wheels, so the first cell failed before any notebook code ran.What Changes
The Colab constraint file (
.github/colab-preinstalled.txt) is refreshed from the current runtime's package list.lock_notebook.py, the Dockerfile base image, and the test and build workflows all move to Python 3.13, and every one of the 44 bootstrap notebooks is re-locked.Re-locking is driven by
requirements.in, and 29 of the 35 image groups predated that contract and had none. A new script,.github/scripts/backfill_requirements.py, derives one for each: it scans the notebooks (and their helper modules) for imports, resolves import names to distribution names inside the group's published container image, and carries overndx-*packages andpkg @ git+pins, which an import scan cannot see because they are used through a file's cached schema rather than imported. The generated files are committed, so this is a one-time backfill; future changes go through the normal contract.Groups that use pynwb are held at
pynwb<4, hdmf<5, which is the stack the fleet was last verified on. The re-lock should fix Colab, not double as a pynwb major upgrade; that can be done deliberately per group later. The demos notebook keeps the nwbwidgets-era stack (pynwb<3), and 001550/PaganLab additionally needspynwb>=3.1plus itsndx-*extension packages, which I verified locally before generalizing the bounds.Verification
All 35 pin sets resolve for Python 3.13 on linux in a
uv pip install --dry-runwith wheels required for every compiled package. 001550/PaganLab ran green end to end locally on 3.13. CI on this PR executes all 44 notebooks on 3.13 runners, which is the real test; I will triage anything that fails here. After merge, the image pipeline rebuilds the whole fleet on the 3.13 base.The Get-to-know-a-Dandiset tutorial had five outputs with an invalid
jetTransientkey that made nbformat validation fail; those outputs are removed.🤖 Generated with Claude Code
https://claude.ai/code/session_011NuStoQykizhQCx2KBrMCN