From 473c7aee7b0f360ae2908044c3e9ee2ecca08f23 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 9 Sep 2026 13:41:46 -0400 Subject: [PATCH] docs: the search prompt asks about JAX gradient-based inference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Choose a search" prompt now asks to see the searches that support gradient based inference using JAX, and says explicitly that this example's likelihood is not JAX, which is why it uses Dynesty. The list below it answers that question: a Gradient-based (JAX) bullet naming BlackJAXNUTS, MultiStartAdam and MultiStartProdigy — verified against the installed `autofit` public API rather than written from memory — and the reason a NumPy likelihood rules them out here. Without it the page would ask a question it never answers. Typo in the supplied text fixed: "likelihood funciton" -> "function". Sphinx: 30 warnings, unchanged against the baseline. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_015LXave3uvSeLEq7S68NjXk --- docs/overview/natural_language.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/overview/natural_language.md b/docs/overview/natural_language.md index 2d75bf5db..8b17cc184 100644 --- a/docs/overview/natural_language.md +++ b/docs/overview/natural_language.md @@ -136,8 +136,10 @@ use domain-specific natural language while keeping it separate from the inferenc ## Choose a search -> Show me the available searches. For this first fit, use Dynesty nested -> sampling with 100 live points to estimate the posterior and evidence. +> Show me the available non-linear searches, including those which support +> gradient based inference using JAX. For this example fit, our likelihood +> function is not implemented using JAX, so lets use Dynesty nested sampling +> with 100 live points to estimate the posterior and evidence. PyAutoFit supports several types of inference algorithm: @@ -146,6 +148,10 @@ PyAutoFit supports several types of inference algorithm: - **MCMC:** Emcee and Zeus, for posterior sampling. - **Optimisation:** algorithms such as L-BFGS, for finding a best-fitting solution. +- **Gradient-based (JAX):** `BlackJAXNUTS` for Hamiltonian / NUTS sampling, and + `MultiStartAdam` / `MultiStartProdigy` for optimisation. These take gradients + of your likelihood automatically, so they require it to be written in JAX — + which is why this example, whose likelihood is plain NumPy, uses Dynesty. The assistant configures the requested search. You can ask it to explain the settings or help choose an algorithm for your likelihood and scientific