Skip to content

test(searches): JAX validation for af.MultiStartProdigy#58

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/multistart-contrib-vmapped-state
Jul 20, 2026
Merged

test(searches): JAX validation for af.MultiStartProdigy#58
Jammy2211 merged 1 commit into
mainfrom
feature/multistart-contrib-vmapped-state

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds the JAX end-to-end validation script for af.MultiStartProdigy, the learning-rate-free multi-start gradient MAP search promoted in the upstream library PR (Phase 1 of the multi-start gradient v2 promotion, autolens_workspace_developer#101).

Mirrors the existing MultiStartAdam.py but runs Prodigy with no learning_rate, and asserts it recovers the 1D Gaussian truth basin (centre, normalization, sigma = 50, 25, 10). This is the JAX cross-backend check that deliberately lives here rather than in PyAutoFit's NumPy-only unit suite: it exercises the parts the unit suite cannot — optax.contrib rule resolution, the per-start jax.vmaped optimizer state (Prodigy's global d estimate kept independent across starts), and the optax.apply_if_finite guard — all on the real JAX backend.

Upstream PR

PyAutoLabs/PyAutoFit#1398 (pending-release) — must merge before this workspace PR (library-first merge gate).

Scripts Changed

Added

  • scripts/searches/MultiStartProdigy.py — end-to-end JAX validation of af.MultiStartProdigy; asserts learning-rate-free truth-basin recovery on the 1D Gaussian dataset.

No existing scripts change (the library API change is additive and backward-compatible; existing MultiStart* scripts are unaffected). Not added to smoke_tests.txt — it follows the MultiStartAdam.py precedent as a full-sweep validation script, keeping the curated smoke subset small.

Test Plan

  • python scripts/searches/MultiStartProdigy.py — passes: Recovered: centre=50.156, normalization=25.196, sigma=9.858, no learning rate.

Generated by the PyAutoLabs agent workflow.

Add scripts/searches/MultiStartProdigy.py, mirroring MultiStartAdam.py but
running the learning-rate-free Prodigy rule (no learning_rate). Asserts
truth-basin recovery on the 1D Gaussian dataset and exercises the parts the
NumPy-only unit suite cannot: optax.contrib resolution, per-start vmapped
optimizer state, and the apply_if_finite guard on the real JAX backend.

Upstream: PyAutoLabs/PyAutoFit#1398.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 20, 2026
@Jammy2211
Jammy2211 merged commit 05f66e9 into main Jul 20, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/multistart-contrib-vmapped-state branch July 20, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant