You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,13 @@ All notable changes to dynesty will be documented in this file.
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
7
## [Unreleased]
8
+
*IMPORTANT* This release includes some major refactoring of class structure in dynesty in to implement the check-pointing. While we haven't seen any breakage in our tests, it is possible that some of more-unusual workflows may be affected. Please submit a bug report on github if you see anything that doesn't look correct. Also, while every effort was made that checkpointing works correctly, it is possible that some corner-cases have been missed. Please report if you see any issues.
8
9
9
10
### Added
11
+
- The nested samplers can now be saved and restored from the file using .save()
12
+
.restore() interface
13
+
- When sampling is performed using run_nested() it is now possible to perform checkpoints at regular intervals, allowing you then resume sampling if it was interrupted
14
+
10
15
### Fixed
11
16
- Sampler.n_effective is no longer unnecessarily computed when sampling with
Copy file name to clipboardExpand all lines: docs/source/dynamic.rst
+36-1Lines changed: 36 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -339,7 +339,7 @@ using the :meth:`~dynesty.dynamicsampler.DynamicSampler.run_nested` function::
339
339
340
340
dsampler.run_nested()
341
341
342
-
or externally as a generator::
342
+
or externally as a generator (not recommended)::
343
343
344
344
from dynesty.dynamicsampler import stopping_function, weight_function
345
345
@@ -442,6 +442,41 @@ could be added to the previous set of samples using::
442
442
443
443
dsampler.add_batch(nlive=250, maxiter=1000)
444
444
445
+
Adding more batches
446
+
-------------------
447
+
448
+
To add more points to the posterior you should be using the :meth:`~dynesty.dynamicsampler.DynamicSampler.add_batch` function. This function has an important parameter that affects how those samples will be generated::
The default mode auto will use the weight function described previously to find the best log-likelihood interval to place a batch.
455
+
The full mode will place add a batch that covers the full posterior, i.e. this is equivalent to adding another static nested run to what you have already.
456
+
Finally the manual mode allows you to add a batch that covers a certain specific log-likelihood range.
457
+
458
+
It is important to understand that there multiple reasons to add batches to a dynamic nested run. One is just to reduce the noise in the posterior/increase the number of effective posterior samples, but another reason is that if you have a very multi-modal problem and you are worried whether you fully sample all the modes, you can do a dynamic run and then keep adding batches till you are satisfied with the result.
459
+
460
+
461
+
Checkpointing with the dynamic sampler
462
+
--------------------------------------
463
+
464
+
Similarly to static nested sampler, the dynamic sampler supports periodic check-pointing into a file if you are sampling using run_nested() interface::
Copy file name to clipboardExpand all lines: docs/source/quickstart.rst
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -453,6 +453,7 @@ users an option as to whether they want to parallelize `dynesty` *during*
453
453
runtime (using a user-provided `pool`) or *after* runtime (by merging
454
454
the runs together).
455
455
456
+
456
457
Running Internally
457
458
------------------
458
459
@@ -520,6 +521,35 @@ to add new samples based on where they left off. This is as easy as::
520
521
sampler.run_nested(dlogz=0.01)
521
522
res3 = sampler.results
522
523
524
+
Checkpointing
525
+
--------------
526
+
527
+
While running the sampler using run_nested() interface it is possible to check-point (or save) the state of the sampler into a file at regular intervals. This file can then be used to restart/resume the sampling::
0 commit comments