From d5ac42b40d051633a37a380c170dba225a86e0a2 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Wed, 20 Mar 2024 19:12:54 +0000 Subject: [PATCH 1/2] No threshold in test mode --- autofit/non_linear/search/abstract_search.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autofit/non_linear/search/abstract_search.py b/autofit/non_linear/search/abstract_search.py index a5e841a32..6c90f99db 100644 --- a/autofit/non_linear/search/abstract_search.py +++ b/autofit/non_linear/search/abstract_search.py @@ -926,6 +926,9 @@ def perform_update( samples_weight_threshold = conf.instance["output"]["samples_weight_threshold"] + if os.environ.get("PYAUTOFIT_TEST_MODE") == "1": + samples_weight_threshold = None + if samples_weight_threshold is not None: samples_for_csv = samples_for_csv.samples_above_weight_threshold_from( weight_threshold=samples_weight_threshold From 4a965852a1bc924a01a3a098496f9a487e3773d8 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Wed, 20 Mar 2024 19:53:27 +0000 Subject: [PATCH 2/2] weight --- .../search/optimize/pyswarms/search/abstract.py | 2 +- docs/api/plot.rst | 8 +++----- docs/overview/the_basics.rst | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/autofit/non_linear/search/optimize/pyswarms/search/abstract.py b/autofit/non_linear/search/optimize/pyswarms/search/abstract.py index 49b5f2d08..5b7af1b2d 100644 --- a/autofit/non_linear/search/optimize/pyswarms/search/abstract.py +++ b/autofit/non_linear/search/optimize/pyswarms/search/abstract.py @@ -159,7 +159,7 @@ def _fit(self, model: AbstractPriorModel, analysis): "Resuming PySwarms non-linear search (previous samples found)." ) - except (FileNotFoundError, TypeError): + except (FileNotFoundError, TypeError, AttributeError): unit_parameter_lists, parameter_lists, log_posterior_list = self.initializer.samples_from_model( total_points=self.config_dict_search["n_particles"], diff --git a/docs/api/plot.rst b/docs/api/plot.rst index 171c01c74..84055e406 100644 --- a/docs/api/plot.rst +++ b/docs/api/plot.rst @@ -22,8 +22,6 @@ Plotters :template: custom-class-template.rst :recursive: - DynestyPlotter - UltraNestPlotter - EmceePlotter - ZeusPlotter - PySwarmsPlotter \ No newline at end of file + NestPlotter + MCMCPlotter + OptimizePlotter \ No newline at end of file diff --git a/docs/overview/the_basics.rst b/docs/overview/the_basics.rst index 3824fe34c..775c10334 100644 --- a/docs/overview/the_basics.rst +++ b/docs/overview/the_basics.rst @@ -505,7 +505,7 @@ corner of the results. .. code-block:: python - search_plotter = aplt.DynestyPlotter(samples=result.samples) + search_plotter = aplt.NestPlotter(samples=result.samples) search_plotter.corner() The plot appears as follows: