Summary
Two NEEDS_FIX markers filed 2026-04-10 blame an IndexError in
InstanceInterpolator.__getitem__ when querying a between-samples time (1.5).
Both markers are stale. The underlying library bug was fixed by
PyAutoFit c8511b553 (2026-04-12) — two days after the markers were filed —
which added the empty-instances guard in autofit/interpolator/abstract.py.
Reproduction on clean main (2026-07-22)
All three repos clean and on main, with output/ moved aside so nothing was
served from cache:
| Run |
Result |
autofit_workspace scripts/features/interpolate.py, real, fresh output/ |
exit 0 |
same script under PYAUTO_TEST_MODE=1, no output/ at all |
exit 0 |
HowToFit chapter_1_introduction/tutorial_5_results_and_samples.py, real |
exit 0 |
Corrections to the original diagnosis
- It is not a bracketing / off-by-one bug.
t == 1.5 interpolation always
worked — test_interpolator.py already exercises between-samples queries at
1.5 in four places. The real failure was an empty instances list reaching
self.instances[0], as the workspace marker's own text said ("value_map
lookup falls through to empty instances list").
- HowToFit
tutorial_5 contains no interpolator code at all. The "likely
related to InstanceInterpolator" text in that marker was a misattribution.
Residual gap
c8511b553 shipped the guard with no test. That is the only code change
left to make.
Plan (high level)
- Add the missing regression test for the empty-instances guard in PyAutoFit.
- Remove the stale NEEDS_FIX marker from
autofit_workspace no_run.yaml.
- Remove the stale NEEDS_FIX marker from
HowToFit no_run.yaml.
- Record here that the fix was
c8511b553 and that the HowToFit marker's
stated cause was never correct.
Plan (detailed)
PyAutoFit/test_autofit/interpolator/test_interpolator.py — add
test_empty_instances_raises: construct af.LinearInterpolator([]), query
interpolator.t == 1.5, assert pytest.raises(IndexError, match="no instances").
numpy-only, no JAX. Verify with pytest test_autofit/interpolator/.
autofit_workspace/config/build/no_run.yaml — delete the
features/interpolate line.
HowToFit/config/build/no_run.yaml — delete the
chapter_1_introduction/tutorial_5_results_and_samples line.
- No notebook regeneration — config-only change in both workspaces.
Branch: feature/interpolator-stale-needs-fix
Out of scope (to be filed separately)
Two exit-0 correctness smells noticed while reproducing, unrelated to the
IndexError:
- HowToFit
tutorial_5: the section printing "only the Gaussian normalization
and sigma" emits 5 values instead of 2.
autofit_workspace features/interpolate: the aggregator block prints a
different t=2 centre than the in-memory block (49.96 vs 59.73 in one run).
Summary
Two NEEDS_FIX markers filed 2026-04-10 blame an
IndexErrorinInstanceInterpolator.__getitem__when querying a between-samples time (1.5).Both markers are stale. The underlying library bug was fixed by
PyAutoFit
c8511b553(2026-04-12) — two days after the markers were filed —which added the empty-instances guard in
autofit/interpolator/abstract.py.Reproduction on clean
main(2026-07-22)All three repos clean and on
main, withoutput/moved aside so nothing wasserved from cache:
autofit_workspace scripts/features/interpolate.py, real, freshoutput/PYAUTO_TEST_MODE=1, nooutput/at allHowToFit chapter_1_introduction/tutorial_5_results_and_samples.py, realCorrections to the original diagnosis
t == 1.5interpolation alwaysworked —
test_interpolator.pyalready exercises between-samples queries at1.5 in four places. The real failure was an empty
instanceslist reachingself.instances[0], as the workspace marker's own text said ("value_maplookup falls through to empty instances list").
tutorial_5contains no interpolator code at all. The "likelyrelated to InstanceInterpolator" text in that marker was a misattribution.
Residual gap
c8511b553shipped the guard with no test. That is the only code changeleft to make.
Plan (high level)
autofit_workspaceno_run.yaml.HowToFitno_run.yaml.c8511b553and that the HowToFit marker'sstated cause was never correct.
Plan (detailed)
PyAutoFit/test_autofit/interpolator/test_interpolator.py— addtest_empty_instances_raises: constructaf.LinearInterpolator([]), queryinterpolator.t == 1.5, assertpytest.raises(IndexError, match="no instances").numpy-only, no JAX. Verify with
pytest test_autofit/interpolator/.autofit_workspace/config/build/no_run.yaml— delete thefeatures/interpolateline.HowToFit/config/build/no_run.yaml— delete thechapter_1_introduction/tutorial_5_results_and_samplesline.Branch:
feature/interpolator-stale-needs-fixOut of scope (to be filed separately)
Two exit-0 correctness smells noticed while reproducing, unrelated to the
IndexError:tutorial_5: the section printing "only the Gaussian normalizationand sigma" emits 5 values instead of 2.
autofit_workspace features/interpolate: the aggregator block prints adifferent
t=2centre than the in-memory block (49.96 vs 59.73 in one run).