From b2428298a1f25466c9ed22c0c57b45fb3f655f9f Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 8 Oct 2026 09:23:06 +0100 Subject: [PATCH 1/2] docs: describe LBFGS/BFGS and the MultiStart optimizers in tutorial_searches The optimizer section claimed PyAutoFit supports only LBFGS. Name the scipy optimizers and the JAX MultiStart gradient optimizers (MultiStartProdigy is used by every autolens_workspace start_here.py) and point to the workspace searches guide. Notebook regenerated. Co-Authored-By: Claude Fable 5.1 --- .../chapter_optional/tutorial_searches.ipynb | 18 +++++++++++++----- scripts/chapter_optional/tutorial_searches.py | 16 ++++++++++++---- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/notebooks/chapter_optional/tutorial_searches.ipynb b/notebooks/chapter_optional/tutorial_searches.ipynb index 9f8d160..b65771f 100644 --- a/notebooks/chapter_optional/tutorial_searches.ipynb +++ b/notebooks/chapter_optional/tutorial_searches.ipynb @@ -58,7 +58,7 @@ " )\n", " _setup_colab = importlib.import_module(\"autonerves.setup_colab\")\n", "\n", - "_setup_colab.setup(\"howtolens\")" + "_setup_colab.setup(\"autolens\")" ] }, { @@ -366,10 +366,18 @@ "likelihood. They want to find the model that maximizes the log likelihood, with no regard for the errors, thus not\n", "wasting time mapping out in intricate detail every facet of parameter space.\n", "\n", - "PyAutoFit supports the LBFGS optimizer (from scipy), which can be used as an alternative to nested sampling when\n", - "only the maximum likelihood model is needed. However, optimizers generally need a good starting point to work well,\n", - "and in our experience the parameter spaces fitted by lens models are often too complex for optimizers without careful\n", - "setup of initialization priors.\n", + "PyAutoFit supports a number of optimizers, which can be used as an alternative to nested sampling when only the\n", + "maximum likelihood model is needed. These include `LBFGS` and `BFGS` (from scipy), which descend the likelihood from a\n", + "single starting point. A single-start optimizer generally needs a good starting point to work well, and in our\n", + "experience the parameter spaces fitted by lens models are often too complex for it without careful setup of initialization\n", + "priors.\n", + "\n", + "PyAutoFit also supports multi-start gradient optimizers (`MultiStartProdigy`, `MultiStartAdam`, `MultiStartADABelief`\n", + "and `MultiStartLion`), which use JAX to launch many optimizations from starting points spread across parameter space\n", + "in parallel and return the best one. This makes them far more robust to complex parameter spaces, and\n", + "`MultiStartProdigy` is the optimizer used by many of the `start_here.py` examples in the `autolens_workspace`. Like any optimizer, they\n", + "return only the best-fit model with no errors. The `autolens_workspace` script `scripts/guides/modeling/searches.py` describes\n", + "every search, including these optimizers, in detail.\n", "\n", "__MCMC__\n", "\n", diff --git a/scripts/chapter_optional/tutorial_searches.py b/scripts/chapter_optional/tutorial_searches.py index 8ebd39e..4601bc6 100644 --- a/scripts/chapter_optional/tutorial_searches.py +++ b/scripts/chapter_optional/tutorial_searches.py @@ -214,10 +214,18 @@ likelihood. They want to find the model that maximizes the log likelihood, with no regard for the errors, thus not wasting time mapping out in intricate detail every facet of parameter space. -PyAutoFit supports the LBFGS optimizer (from scipy), which can be used as an alternative to nested sampling when -only the maximum likelihood model is needed. However, optimizers generally need a good starting point to work well, -and in our experience the parameter spaces fitted by lens models are often too complex for optimizers without careful -setup of initialization priors. +PyAutoFit supports a number of optimizers, which can be used as an alternative to nested sampling when only the +maximum likelihood model is needed. These include `LBFGS` and `BFGS` (from scipy), which descend the likelihood from a +single starting point. A single-start optimizer generally needs a good starting point to work well, and in our +experience the parameter spaces fitted by lens models are often too complex for it without careful setup of initialization +priors. + +PyAutoFit also supports multi-start gradient optimizers (`MultiStartProdigy`, `MultiStartAdam`, `MultiStartADABelief` +and `MultiStartLion`), which use JAX to launch many optimizations from starting points spread across parameter space +in parallel and return the best one. This makes them far more robust to complex parameter spaces, and +`MultiStartProdigy` is the optimizer used by many of the `start_here.py` examples in the `autolens_workspace`. Like any optimizer, they +return only the best-fit model with no errors. The `autolens_workspace` script `scripts/guides/modeling/searches.py` describes +every search, including these optimizers, in detail. __MCMC__ From ae62ccd5c2c5052a37c0347e7e18e5f1b04e21bf Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 8 Oct 2026 09:49:31 +0100 Subject: [PATCH 2/2] docs: regenerate the navigator catalogue after the tutorial_searches edit Co-Authored-By: Claude Fable 5.1 --- workspace_index.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/workspace_index.json b/workspace_index.json index fcf37d2..d110d2c 100644 --- a/workspace_index.json +++ b/workspace_index.json @@ -728,7 +728,10 @@ "Optimizers", "MCMC" ], - "cross_refs": [], + "cross_refs": [ + "scripts/guides/modeling/searches.py", + "start_here.py" + ], "notebook": "notebooks/chapter_optional/tutorial_searches.ipynb", "path": "scripts/chapter_optional/tutorial_searches.py", "summary": "Up to now, we've always used the non-linear search Nautilus and not considered the input parameters that control its sampling. In this tutorial, we'll consider how we can change these setting to balance finding the global maxima solution with fast run time.",