Skip to content

fix: point Colab links at main so the #63 dependency stopgap reaches readers - #64

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/howtofit-tutorial-dependencies-frmvth
Sep 15, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
claude/howtofit-tutorial-dependencies-frmvth

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Why

#63 added the lazy-dependency stopgap (corner, optax, xxhash, blackjax) to every notebook under notebooks/ — on main. But every Colab link in README.md points at the release tag 2026.9.15.1, so a reader clicking a badge opens the tagged notebook, which has no stopgap. Tutorial 5 still dies with No module named 'corner' after its emcee search completes.

#63 said this itself ("the Colab badge links point at release tags, not main, so a notebook edit alone cannot reach an attendee clicking a README badge") and left the retroactive fix to PyAutoNerves#167/#168. That landed on PyAutoNerves main but is not released — PyPI's latest autonerves is 2026.9.15.1, whose _SHARED_EXTRAS still lacks all four packages (verified against the published wheel). So the tagged notebooks currently have no route to the dependencies at all.

What this does

Verification

Reproduced and fixed in a Python 3.12 environment mirroring Colab's bootstrap (base scientific stack preinstalled, then the released autonerves package list installed --no-deps):

before stopgap after stopgap
import autofit OK 2026.9.15.1 OK
corner ModuleNotFoundError OK 2.2.2
optax ModuleNotFoundError OK 0.2.8
xxhash ModuleNotFoundError OK
blackjax ModuleNotFoundError OK 1.6.2

The call paths the tutorials actually hit all import cleanly afterwards: aplt.corner_cornerpy, the multi_start_gradient (optax) search, the BlackJAX NUTS search, and graphical/factor_graphs/factor (xxhash). anesthetic, emcee, dynesty, nautilus and pyvis were already covered by the bootstrap list.

Notebook edit is a pure insertion: 14 lines added, 0 removed, JSON valid, cell count unchanged, and the install confirmed by ast to sit in the try/except's else branch so it only ever runs on Colab.

Note for follow-up

optax and blackjax installed --no-deps need absl-py, which is not in the stopgap list. Colab preinstalls it (via tensorboard) so this works, but the list carries an unstated reliance on Colab's base image. Adding "absl-py" would close that; left out here to avoid touching 19 notebooks immediately before a workshop.

Revert conditions

Both changes are stopgaps. Once autonerves > 2026.9.15.1 is on PyPI, the bootstrap installs all four itself, every published notebook is fixed retroactively including tag-pinned ones, and the README links should go back to tag-pinning.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PGmwRWuiKbxf8PKpCJoA96


Generated by Claude Code

The Colab badge and tutorial links in README.md all pointed at the release
tag 2026.9.15.1. The lazy-dependency stopgap added in #63 landed on main
only, so an attendee clicking a README link got the tagged notebook, which
has no stopgap, and tutorial 5 still died with `No module named 'corner'`
after its emcee search completed.

The released autonerves (2026.9.15.1) is also still missing the four
packages from its `_SHARED_EXTRAS` bootstrap list — PyAutoNerves#168 fixed
that on main but has not been released — so the tagged notebooks have no
other route to the dependencies.

Repointing the links at main is the only change that reaches a workshop
attendee today. main is the tagged release plus the #63 insertion and
nothing else, so the notebooks are otherwise identical to the tag.

Also adds the same stopgap to the root start_here.ipynb, which #63 missed
(it only walked notebooks/). It runs no fits so it did not crash, but it is
the notebook the top README badge opens.

Revert both once autonerves > 2026.9.15.1 is on PyPI.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PGmwRWuiKbxf8PKpCJoA96
@Jammy2211
Jammy2211 merged commit f4bca40 into main Sep 15, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the claude/howtofit-tutorial-dependencies-frmvth branch September 15, 2026 08:15
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