From 1b9dc65f24c8aea3a477ed5b0b4f1f2a5c53534e Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Mon, 29 Apr 2024 12:46:38 +0100 Subject: [PATCH] docs --- .../non_linear/search/nest/dynesty/search/static.py | 2 +- docs/cookbooks/result.rst | 12 +++++++----- requirements.txt | 1 - 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/autofit/non_linear/search/nest/dynesty/search/static.py b/autofit/non_linear/search/nest/dynesty/search/static.py index a08d3f8a9..65b9b5dee 100644 --- a/autofit/non_linear/search/nest/dynesty/search/static.py +++ b/autofit/non_linear/search/nest/dynesty/search/static.py @@ -21,7 +21,6 @@ def __init__(self, function): def grad(self): import jax from jax import grad - print("Compiling gradient") return jax.jit(grad(self.function)) @@ -135,6 +134,7 @@ def search_internal_from( The number of CPU's over which multiprocessing is performed, determining how many samples are stored in the dynesty queue for samples. """ + if self.use_gradient: gradient = GradWrapper(fitness) else: diff --git a/docs/cookbooks/result.rst b/docs/cookbooks/result.rst index d1c9fadc3..993e573fb 100644 --- a/docs/cookbooks/result.rst +++ b/docs/cookbooks/result.rst @@ -102,11 +102,13 @@ The output appears as follows: Loading From Hard-disk ---------------------- -When performing fits which output results to hard-disc, a ``files`` folder is created containing .json / .csv files of -the model, samples, search, etc. +When performing fits which output results to hard-disk, a `files` folder is created containing .json / .csv files of +the model, samples, search, etc. You should check it out now for a completed fit on your hard-disk if you have +not already! -These files can be loaded from hard-disk to Python variables via the aggregator, making them accessible in a -Python script or Jupyter notebook. +These files can be loaded from hard-disk to Python variables via the aggregator, making them accessible in a +Python script or Jupyter notebook. They are loaded as the internal **PyAutoFit** objects we are familiar with, +for example the `model` is loaded as the `Model` object we passed to the search above. Below, we will access these results using the aggregator's ``values`` method. A full list of what can be loaded is as follows: @@ -126,7 +128,7 @@ the full non-linear search samples, for example every parameter sample and its l contains a summary of the results, for example the maximum log likelihood model and error estimates on parameters at 1 and 3 sigma confidence. -Accessing results via the ``samples_summary`` is much faster, because as it does reperform calculations using the full +Accessing results via the ``samples_summary`` is much faster, because as it does not reperform calculations using the full list of samples. Therefore, if the result you want is accessible via the ``samples_summary`` you should use it but if not you can revert to the ``samples. diff --git a/requirements.txt b/requirements.txt index 8f11787e7..f50f3246a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,6 @@ typing-inspect>=0.4.0 emcee>=3.1.3 gprof2dot==2021.2.21 matplotlib -networkx numpydoc>=1.0.0 pyprojroot==0.2.0 pyswarms==1.3.0