From 32074018864df513cc180a79bc79c6b8419b686f Mon Sep 17 00:00:00 2001 From: Colm Talbot <colm.talbot@ligo.org> Date: Wed, 10 Jul 2024 19:09:33 +0000 Subject: [PATCH] MAINT: suppress dynesty warning --- bilby/core/sampler/dynesty.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bilby/core/sampler/dynesty.py b/bilby/core/sampler/dynesty.py index bb931ed3b..70480c6b8 100644 --- a/bilby/core/sampler/dynesty.py +++ b/bilby/core/sampler/dynesty.py @@ -3,6 +3,7 @@ import inspect import os import sys import time +import warnings import numpy as np from pandas import DataFrame @@ -677,10 +678,17 @@ class Dynesty(NestedSampler): chain of nested samples within dynesty and have to be removed before restarting the sampler. """ + logger.debug("Running sampler with checkpointing") old_ncall = self.sampler.ncall 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: self.finalize_sampler_kwargs(sampler_kwargs) self.sampler.run_nested(**sampler_kwargs) -- GitLab