Skip to content

docs(searches): add multi-start gradient searches to the MLE example #94

Description

@Jammy2211

Overview

Phase 2 (redefined) of the multi-start gradient MAP search promotion (PyAutoFit#1369; library + JAX validation shipped in Fit#1370 + autofit_workspace_test#43). The original "config + packaged defaults" phase was found to be empty — PyAutoFit searches have no per-search parameter config and the new searches add zero config keys. The real remaining work is the user-facing workspace example.

Plan

  • Add a Search: MultiStartAdam section to scripts/searches/mle.py (after LBFGS), running the new search on the shared 1D Gaussian model and plotting the max-log-likelihood fit, mirroring the Drawer/LBFGS sections.
  • Give that section its own JAX-traceable analysis (the searches are JAX-native): enable_pytrees() + register_model(model) + af.ex.Analysis(use_jax=True); leave the shared use_jax=False analysis for Drawer/LBFGS untouched.
  • Note MultiStartADABelief / MultiStartLion as drop-in alternatives, and what multi-start buys (escaping wrong basins).
  • Update the module docstring bullets, __Contents__, and Relevant links.
  • Regenerate the paired notebooks/searches/mle.ipynb.
Detailed implementation plan

Affected Repositories

  • autofit_workspace (primary)

Branch Survey

Repository Current Branch Dirty?
./autofit_workspace main clean

Suggested branch: feature/multi-start-gradient-examples

Implementation Steps

  1. scripts/searches/mle.py: extend header (docstring bullets + __Contents__ + Relevant links); add a MultiStartAdam section with enable_pytrees()/register_model(model), af.ex.Analysis(use_jax=True), af.MultiStartAdam(path_prefix="searches", name="MultiStartAdam", n_starts=…, n_steps=…), search.fit, and the standard fit plot; add a short note on ADABelief/Lion.
  2. Regenerate notebooks/searches/mle.ipynb from the script (keep the mirror in sync).
  3. Run the script end-to-end to confirm it executes and recovers the truth basin.

Key Files

  • autofit_workspace/scripts/searches/mle.py — the MLE searches example
  • autofit_workspace/notebooks/searches/mle.ipynb — generated mirror
  • Reference: autofit_workspace_test scripts/searches/Nautilus_jax.py (JAX analysis + pytree registration pattern)

Autonomy

  • --auto, effective level safe (docs cap; difficulty small). Plan written here at start, unmodified since.

Original Prompt

Click to expand

Document af.MultiStartAdam / MultiStartADABelief / MultiStartLion in autofit_workspace scripts/searches/mle.py (JAX-native → use_jax=True analysis + pytree registration), mirroring Drawer/LBFGS; regenerate the paired notebook; update header + links. Opus-authored prose. Cheap run.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions