From 8336939fcdacb06e27b3bcbe0b651f0242afe1be Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Mon, 14 Sep 2026 22:07:29 +0100 Subject: [PATCH] fix: install emcee and dynesty in the Colab bootstrap The Colab setup installs the PyAuto stack with `--no-deps`, on the premise that Colab already ships the scientific stack. `emcee` and `dynesty` are real `autofit` dependencies (PyAutoFit/pyproject.toml) that Colab does not ship and `_SHARED_EXTRAS` did not name, so they never landed: every Colab notebook that runs `af.Emcee` or `af.DynestyStatic` died with `ModuleNotFoundError` at the fit. Reported against HowToFit tutorial 3. Both are now named in `_SHARED_EXTRAS` with the specifiers autofit declares, and a comment records why a `--no-deps` install has to list them. Refs PyAutoLabs/HowToFit#57 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_0132v5TNVbbvBBESAefHwnwG --- autonerves/setup_colab.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/autonerves/setup_colab.py b/autonerves/setup_colab.py index 33545aa..da118bd 100644 --- a/autonerves/setup_colab.py +++ b/autonerves/setup_colab.py @@ -27,6 +27,13 @@ _XLA_FLAGS = "--xla_disable_hlo_passes=constant_folding" # Notebook / runtime extras installed alongside every project's core stack. +# +# The install below is `--no-deps`, so anything a PyAuto package declares as a +# dependency but Colab does not already ship has to be named here or it never +# lands. `emcee` and `dynesty` are real `autofit` dependencies driving the +# `af.Emcee` and `af.DynestyStatic` searches (PyAutoFit/pyproject.toml), and +# without them every Colab notebook that runs a search dies with +# `ModuleNotFoundError` at the fit; their specifiers track that file. _SHARED_EXTRAS = [ "pyvis==0.3.2", "dill==0.4.0", @@ -34,6 +41,8 @@ "nautilus-sampler==1.0.4", "timeout_decorator==0.5.0", "anesthetic==2.8.14", + "emcee>=3.1.6", + "dynesty==2.1.5", ] _AUTOFIT_STACK = ["autonerves", "autofit"]