Regenerate locks against Colab preinstalled versions#159
Merged
Conversation
Applies the same Colab-version-matching approach that landed in PR #157 (Sargolini2006) to the rest of the bootstrapped notebooks. Wherever a notebook's direct deps allow, the lock now matches Colab's preinstalled version exactly — so the install cell becomes a no-op for those packages and no kernel restart is needed on Colab. Adds .github/colab-preinstalled.txt (Colab's pip-freeze from googlecolab/backend-info, refreshed 2026-05-13). Each notebook's lock is then resolved with this file as a uv `--constraint`. Two systematic adjustments applied during regen: 1. dandi floor bumped to >=0.74. The DANDI server now rejects clients older than 0.74 with CliVersionTooOldError. PR-141-era inputs had `dandi>=0.60` which let the resolver pick stale versions. The regen pipeline bumps the floor to 0.74 in every notebook's input. 2. click dropped from Colab constraints where needed. Colab ships click==8.3.3 but dandi >=0.74 caps click at <8.2. Resolution drops click for affected notebooks; it downgrades to 8.1.x. Click is a small CLI lib with no C extension or numpy dep, so the downgrade doesn't trigger a kernel restart. Results across the 30 regenerated notebooks (Sargolini2006 already covered by #157, test-excluded notebooks skipped): - Every notebook now pins dandi >=0.74 (or doesn't depend on dandi Python client at all — NWBWidget-demo uses requests directly). - numpy unchanged at 2.0.2 (Colab default) on every notebook EXCEPT: * the dattalab reproduce_figure_* (numpy<2 for cellpose/np.NaN) * Turner motor-cortex (env.yml hard-pins numpy==2.2.6) - pandas, scipy, h5py, plotly, matplotlib, etc. all match Colab wherever the notebook doesn't have specific older-version constraints. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
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). |
bendichter
added a commit
to catalystneuro/example-notebooks
that referenced
this pull request
May 14, 2026
…i#156) The lock generated by PR dandi#159 pinned `numpy==1.26.4` because the PR-141-era input deps included `numpy>=1.26,<2`. That cap was there because the notebook used `np.NaN` (removed in numpy 2.0). PR dandi#156 already replaced `np.NaN` with `np.nan`, so the cap is now stale and the notebook code is numpy-2.x clean. Re-resolved with `numpy>=1.26` (no upper cap) against the Colab constraints set. The only line that changed is the numpy pin — everything else was already at Colab versions: numpy 1.26.4 -> 2.0.2 (matches Colab — no restart on install) Now the install on Colab is fully no-op for numpy/pandas/scipy/h5py/etc. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Applies the Colab-version-matching approach from PR #157 (Sargolini2006) to the rest of the bootstrapped notebooks (30 of them). Wherever a notebook's direct deps allow, the lock now matches Colab's preinstalled version exactly — so the install cell becomes a no-op for those packages on a fresh Colab runtime and no kernel restart is needed.
What's added
.github/colab-preinstalled.txt— Colab's pip-freeze, sourced from googlecolab/backend-info on 2026-05-13. Each notebook's lock is regenerated with this file as auv pip compile --constraint.Two systematic adjustments
dandi>=0.74floor. The DANDI server now rejects clients older than 0.74 withCliVersionTooOldError. PR-141-era inputs haddandi>=0.60, which the resolver was happy to satisfy with stale 0.68.x — that crashes at the firstDandiAPIClient()call. Bumped the floor in every input.clickdropped from Colab constraints where needed. Colab hasclick==8.3.3, butdandi >=0.74caps click at<8.2. The iterative resolver drops click from constraints and lets uv pick a compatible version (click==8.1.x). Click is a small CLI lib with no C extension or numpy dep, so the downgrade doesn't trigger a kernel restart.Results — 30 notebooks regenerated
dandipin >= 0.74numpy==2.0.2(matches Colab)reproduce_figure_*(need numpy<2) and 4 Turner motor-cortex (env.yml hard-pins numpy==2.2.6)pandas==2.2.2,scipy==1.16.3,h5py==3.16.0,matplotlib==3.10.0,plotly==5.24.1Out of scope
.github/notebook-test-exclusions.txt— skipped here since CI doesn't test them anyway. Their bootstraps still have older locks; a follow-up could regenerate those for the Colab-button UX, but they have other blocking issues that need fixing first.How to verify
Per-PR CI will exercise each touched notebook automatically. Spot-check after merge by opening any non-dattalab/non-Turner notebook in Colab — the
!uv pip installcell should report most packages as "already satisfied".🤖 Generated with Claude Code