Skip to content
Snippets Groups Projects
Commit 10d9bf45 authored by Gregory Ashton's avatar Gregory Ashton Committed by Colm Talbot
Browse files

BUGFIX: Add a catch for linalg exceptions

parent 62efe7e0
No related branches found
No related tags found
1 merge request!1251Add a catch for linalg exceptions
......@@ -805,7 +805,7 @@ class FisherMatrixProposal(AdaptiveGaussianProposal):
weight=1,
update_interval=100,
scale_init=1e0,
fd_eps=1e-6,
fd_eps=1e-4,
adapt=False,
):
super(FisherMatrixProposal, self).__init__(
......@@ -827,7 +827,7 @@ class FisherMatrixProposal(AdaptiveGaussianProposal):
)
try:
self.iFIM = fmp.calculate_iFIM(sample.dict)
except (RuntimeError, ValueError) as e:
except (RuntimeError, ValueError, np.linalg.LinAlgError) as e:
logger.warning(f"FisherMatrixProposal failed with {e}")
if hasattr(self, "iFIM") is False:
# No past iFIM exists, return sample
......
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