Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feature/test mode samples weight threshold #979

Merged
merged 4 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion autofit/config/output.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ samples: true

# Set value to empty (e.g. delete 1.0e-10 below) to disable this feature.

samples_weight_threshold: 1.0e-10
samples_weight_threshold:

### Search Internal ###

Expand Down
3 changes: 3 additions & 0 deletions autofit/non_linear/search/abstract_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
8 changes: 3 additions & 5 deletions docs/api/plot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Plotters
:template: custom-class-template.rst
:recursive:

DynestyPlotter
UltraNestPlotter
EmceePlotter
ZeusPlotter
PySwarmsPlotter
NestPlotter
MCMCPlotter
OptimizePlotter
2 changes: 1 addition & 1 deletion docs/overview/the_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading