Skip to content

Commit

Permalink
ENH: add warning about max steps
Browse files Browse the repository at this point in the history
  • Loading branch information
mj-will committed Oct 23, 2024
1 parent f4883fc commit 7929973
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nessai/experimental/proposal/mcmc/proposal.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@ def populate(
z_chain[i] = z_current
if self.n_accept is not None and n_accept.mean() > self.n_accept:
break
else:
if self.n_accept is not None:
logger.warning(
(
f"Reached max steps ({self.n_steps}) with "
f"n_accept={self.n_accept}!"
)
)

z_new_history = np.array(z_new_history)
self.step.update_stats(
Expand Down

0 comments on commit 7929973

Please sign in to comment.