Skip to content
Snippets Groups Projects
Commit 32074018 authored by Colm Talbot's avatar Colm Talbot
Browse files

MAINT: suppress dynesty warning

parent a2f2a878
No related branches found
No related tags found
1 merge request!1365MAINT: suppress dynesty warning
Pipeline #642246 passed
...@@ -3,6 +3,7 @@ import inspect ...@@ -3,6 +3,7 @@ import inspect
import os import os
import sys import sys
import time import time
import warnings
import numpy as np import numpy as np
from pandas import DataFrame from pandas import DataFrame
...@@ -677,10 +678,17 @@ class Dynesty(NestedSampler): ...@@ -677,10 +678,17 @@ class Dynesty(NestedSampler):
chain of nested samples within dynesty and have to be removed before chain of nested samples within dynesty and have to be removed before
restarting the sampler. restarting the sampler.
""" """
logger.debug("Running sampler with checkpointing") logger.debug("Running sampler with checkpointing")
old_ncall = self.sampler.ncall old_ncall = self.sampler.ncall
sampler_kwargs = self.sampler_function_kwargs.copy() sampler_kwargs = self.sampler_function_kwargs.copy()
warnings.filterwarnings(
"ignore",
message="The sampling was stopped short due to maxiter/maxcall limit*",
category=UserWarning,
module="dynesty.sampler",
)
while True: while True:
self.finalize_sampler_kwargs(sampler_kwargs) self.finalize_sampler_kwargs(sampler_kwargs)
self.sampler.run_nested(**sampler_kwargs) self.sampler.run_nested(**sampler_kwargs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment