Skip to content

Commit

Permalink
allow max_tries inf
Browse files Browse the repository at this point in the history
  • Loading branch information
cmbant committed Nov 2, 2022
1 parent e0c2d29 commit 56ca06a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cobaya/samplers/mcmc/mcmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def initialize(self):
self.max_tries.set_scale(self.model.prior.d())
self.log.info("Getting initial point... (this may take a few seconds)")
initial_point, results = \
self.model.get_valid_point(max_tries=self.max_tries.value,
self.model.get_valid_point(max_tries=min(self.max_tries.value, int(1e7)),
random_state=self._rng)
# If resuming but no existing chain, assume failed run and ignore blocking
# if speeds measurement requested
Expand Down Expand Up @@ -247,7 +247,7 @@ def set_proposer_blocking(self):
if self.drag_interp_steps < 2:
self.drag = False
self.mpi_warning("Dragging disabled: "
"speed ratio and fast-to-slow ratio not large enough.")
"speed ratio and fast-to-slow ratio not large enough.")
# Define proposer and other blocking-related quantities
if self.drag:
# MARKED FOR DEPRECATION IN v3.0
Expand Down

0 comments on commit 56ca06a

Please sign in to comment.