Skip to content

Commit f4c45c1

Browse files
authored
Merge pull request #84 from PyAutoLabs/feature/multi-start-auto-convergence-real-search
fix(jax-assertions): run multi_start_gradient_auto_convergence with a real search
2 parents 1a39a7b + a4f3263 commit f4c45c1

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

scripts/jax_assertions/multi_start_gradient_auto_convergence.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
=====================================================================
44
55
Validation of the auto-convergence (early-stopping) mode on the multi-start
6-
gradient MAP searches (``af.AbstractMultiStartGradient`` — ``MultiStartAdam`` /
6+
gradient MAP searches (``AbstractMultiStartGradient`` — ``MultiStartAdam`` /
77
``MultiStartADABelief`` / ``MultiStartLion`` / ``MultiStartProdigy``), phase 1 of
88
the auto-convergence work (PyAutoFit #1406/#1407).
99
@@ -41,7 +41,14 @@
4141
JAX assertion scripts test JAX behaviour; disabling JAX makes their
4242
assertions vacuous.
4343
44-
ENV: jax
44+
This one also needs the real search (as ``searches/MultiStartAdam.py`` does).
45+
Under ``PYAUTO_TEST_MODE=2`` the sampler is bypassed before ``_fit`` runs, so
46+
``samples_info`` is built from the bypass stub and never carries ``total_steps``
47+
— the part-A read raises ``KeyError``. The bypass could not satisfy the
48+
assertions anyway: it returns the prior median, which for this
49+
``LogUniformPrior(1e-2, 1e2)`` is a normalization of 1.0, not 25.0.
50+
51+
ENV: real_search jax
4552
"""
4653

4754
import numpy as np

0 commit comments

Comments
 (0)