Repository navigation
Description
Overview
HowToFit tutorials 6 and 7 construct af.BlackJAXNUTS (tutorial 6 also af.Nautilus), but neither blackjax nor nautilus-sampler is on the documented local install route: PyAutoFit declares them only in its optional extra and HowToFit/requirements.txt is just autofit + numba. CI runs at PYAUTO_TEST_MODE=2, which bypasses the sampler, so the smoke gate is green while a reader hits ModuleNotFoundError: No module named 'blackjax'.
The Colab leg of this prompt already merged as PyAutoNerves#168 (_SHARED_EXTRAS now carries blackjax>=1.6.2 and nautilus-sampler==1.0.5) and goes live with the next autonerves PyPI release — PyPI is still 2026.9.15.1, which predates it. This task does the remaining local-install leg and, at the human's request now that the 2026-09-15 workshop is over, reverts the Colab stopgap that was merged for it (HowToFit #63/#64, HowToGalaxy #77, HowToLens #85), each of which was labelled "REMOVE once autonerves > 2026.9.15.1".
Merge condition: reverting the stopgap before autonerves > 2026.9.15.1 is on PyPI re-opens the Colab gap on every notebook until that release lands. Merge these PRs only once pip index versions autonerves shows a newer version, or with the human explicitly accepting the interim gap.
Plan
- Add
blackjaxandnautilus-samplertoHowToFit/requirements.txtso the local route installs what the tutorials run. - Revert the four workshop-stopgap merges with plain
git revert -m 1commits (no history rewrite) in HowToFit, HowToGalaxy and HowToLens. - Revert HowToFit fix: point Colab links at main so the #63 dependency stopgap reaches readers #64's README badge repointing too: the release tool only re-pins version-shaped badge tags, so
blob/main/links would never be re-pinned. - One PR per repo, all cross-referencing this issue; no smoke run is meaningful for a pure revert to released notebooks plus a requirements line.
- Out of scope: cutting the autonerves release; a smoke-profile import guard for constructed searches (separate prompt); the
/prmclose-out of thecolab-workshop-dep-stopgaptask.
Detailed implementation plan
Work Classification
Workspace
Affected Repositories
- HowToFit (primary)
- HowToGalaxy
- HowToLens
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./HowToFit | main @ f4bca40 | clean |
| ./HowToGalaxy | main @ 95eb176 | clean |
| ./HowToLens | main @ 5c3c727 | clean |
Worktree guard: HowToFit/HowToGalaxy/HowToLens are claimed by colab-workshop-dep-stopgap (all PRs merged, stale claim) and HowToFit by howtofit-mode (README/AGENTS prompt propagation, 0 own commits). Human-approved parallel-claim override 2026-09-15; file sets disjoint.
Suggested branch: feature/blackjax-reqs-stopgap-revert
Worktree root: ~/Code/PyAutoLabs-wt/blackjax-reqs-stopgap-revert/
Implementation Steps
- HowToFit:
git revert -m 1 f4bca40(PR fix: point Colab links at main so the #63 dependency stopgap reaches readers #64: 20 README badgesblob/2026.9.15.1/→blob/main/, stopgap cell instart_here.ipynb), thengit revert -m 1 1b85e12(PR fix: install autofit's lazily-imported deps in the Colab setup cell #63: stopgap cell in 18notebooks/**/*.ipynb+ one README paragraph). - HowToFit: edit
requirements.txttoautofit,numba,blackjax,nautilus-sampler(unpinned, matching the file's and its siblings' convention; pinned literals would recreate the drift PyAutoNerves#168 fixed). Separate commit from the reverts. - HowToGalaxy:
git revert -m 1 95eb176(PR docs: simplify Colab setup across tutorials #77: stopgap cell in 32 notebooks). - HowToLens:
git revert -m 1 5c3c727(PR #85: stopgap cell in 50 notebooks). - Verify per repo:
git diff 2026.9.15.1 HEAD --statis empty for HowToGalaxy/HowToLens and, for HowToFit, shows onlybd08343's docs change plusrequirements.txt | 2 +; HowToFit README has 20blob/2026.9.15.1/and 1blob/main/link (the tagged counts); every touched.ipynbparses as JSON; a scratch venvpip install -r requirements.txtfollowed bypython -c "import blackjax, nautilus"succeeds. ship_workspace: one PR per repo againstmain, PR bodies carrying the merge condition above.
Key Files
HowToFit/requirements.txt— the local install route the tutorials document.HowToFit/README.md,HowToFit/start_here.ipynb,HowToFit/notebooks/**/*.ipynb— restored to the2026.9.15.1content by the reverts.HowToGalaxy/notebooks/**/*.ipynb,HowToLens/notebooks/**/*.ipynb— same.PyAutoHands/autohands/bump_colab_urls.sh:30— why theblob/main/badges must not stay.PyAutoNerves/autonerves/setup_colab.py_SHARED_EXTRAS— the already-merged Colab fix (#168).
Original Prompt
Click to expand starting prompt
HowToFit tutorials 6 and 7 die at the NUTS fit — blackjax is on no install route
Type: bug
Target: HowToFit
Repos:
- HowToFit
- PyAutoNerves
Themes: - tutorials
- colab
- dependencies
Difficulty: small
Autonomy: safe
Priority: high
Status: formalised
Consequence: judge
Review-minutes: 10
Unattended: ready
Witness: with onlypip install autofit numba(or a Colabsetup_colab.setup("howtofit")),python3 scripts/chapter_1_introduction/tutorial_6_gradients.pyandtutorial_7_the_details.pyboth run to completion instead of raisingModuleNotFoundError: No module named 'blackjax'.
Filed: 2026-09-15
Symptom
Measured 2026-09-15 against HowToFit main @ b174c03 (PR #62), PyAutoFit main,
Python 3.12.3, at real settings (no PYAUTO_TEST_MODE, visualization on):
tutorial_6_gradients.py FAIL (11.0s) ModuleNotFoundError: No module named 'blackjax'
tutorial_7_the_details.py FAIL (67.1s) ModuleNotFoundError: No module named 'blackjax'
Installing blackjax>=1.6.2 and nautilus-sampler and re-running, nothing
else changed: tutorial 6 rc=0 in 43s, tutorial 7 rc=0 in 73s, both completing
their real BlackJAXNUTS (and, in 6, Nautilus) fits. The missing
dependency is the whole defect.
Why no gate sees it
CI runs PYAUTO_TEST_MODE=2 (config/build/profile_smoke.yaml), which
bypasses the sampler, so af.BlackJAXNUTS is never constructed and blackjax
is never imported. Both tutorials PASS the smoke gate — 18/18 green — while
being unrunnable by a reader. This is the same blind spot config/build/no_run.yaml
already documents for tutorial_5_expectation_propagation ("only passes today
because CI runs at PYAUTO_TEST_MODE=2, which bypasses the sampler").
Why it is missing on every route
HowToFit/requirements.txtisautofit+numba.- PyAutoFit declares blackjax in the optional extra, not the base
dependencies (PyAutoFit/pyproject.toml:83,[project.optional-dependencies] optional), sopip install autofitdoes not bring it. Same for
nautilus-sampler, which tutorial 6 also runs (:727). - Colab:
autonerves/setup_colab.pyinstalls_SHARED_EXTRASwith--no-deps
(:280)._SHARED_EXTRAS(:37-46) lists pyvis, dill, jaxnnls,
nautilus-sampler, timeout_decorator, anesthetic, emcee, dynesty — and no
blackjax. Exactly the gap PyAutoNerves #166 closed for emcee and dynesty,
one package short.
Searches actually run: tutorial 6 — LBFGS, MultiStartAdam, Emcee,
BlackJAXNUTS(:685), Nautilus(:727); tutorial 7 — DynestyStatic x3,
Emcee x2, MultiStartAdam x2, BlackJAXNUTS(:1086).
Tutorial 7's NUTS fit is new tonight: PR #62 moved the Hamiltonian
diagnostics out of tutorial 6 and gave tutorial 7 its own short BlackJAXNUTS
fit, so tutorial 7 is a fresh breakage, tutorial 6 a pre-existing one.
Fix
PyAutoNerves/autonerves/setup_colab.py: add"blackjax>=1.6.2"to
_SHARED_EXTRAS, trackingPyAutoFit/pyproject.toml's specifier as the
emcee/dynesty entries already do.HowToFit/requirements.txt: addblackjaxandnautilus-samplerso the
documented local route installs what the tutorials run.- While there:
_SHARED_EXTRASpinsnautilus-sampler==1.0.4where
PyAutoFit's optional extra pins==1.0.5. Reconcile.
A follow-up worth its own prompt: the smoke profile's PYAUTO_TEST_MODE=2
cannot see a missing sampler dependency at all. A cheap guard is an import
check over the af.<Search> classes each script constructs, run at smoke
settings.
Activity
Jammy2211 commentedon Sep 15, 2026
Workspace PRs Created
Merge condition (all three):
autonervesnewer than2026.9.15.1on PyPI (PyAutoNerves#168 released), or an explicit decision to accept the interim Colab gap./prmper PR; the issue closes with the last one.Jammy2211 commentedon Sep 15, 2026
Shipped — 2026-09-15
PRs
Summary
HowToFit/requirements.txtnow carriesblackjax>=1.6.2andnautilus-sampler==1.0.5(PyAutoFit's own specifiers), so the documented local install route brings what tutorials 6 and 7 construct. The 2026-09-15 workshop Colab stopgap was reverted in all three HowTo repos with plaingit revert -m 1commits (HowToFit #63/#64, HowToGalaxy #77, HowToLens #85); notebooks are byte-identical to the2026.9.15.1release and the HowToFit README badges are back on release-tag pinning, which the release tool can re-pin.Session Notes
colab-bootstrap-lazy-deps; only the local-install leg remained.autonerveswas still2026.9.15.1: Colab readers hit the missing-dependency error until the nextautonervesrelease publishes PyAutoNerves#168. That release is the outstanding obligation (release-gate: PyAutoNerveson the completion record).PYAUTO_TEST_MODE=2cannot see a missing sampler backend; the follow-up guard is filed asPyAutoMind/draft/feature/pyautohands/smoke_profile_cannot_see_a_missing_sampler.md.colab-workshop-dep-stopgap(the task this reverts) was closed out the same day: recordPyAutoMind/complete/2026/09/colab-workshop-dep-stopgap.md.