New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DM-41900: Catch Cholesky failures #872
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a fine way to catch this specific error; please consider adding a log message to trace it later if this becomes more widespread. Perhaps the first of many informative logs from this task ;)
e46f3cf
to
7f0d771
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better with logging, thank you! Please just finish the docstring and good to go.
@@ -378,6 +378,7 @@ def fit(self, dChi2Tol=0.1, maxIter=100): | |||
Maximum number of fit iterations allowed. The fit should converge in | |||
~10 iterations, depending on the value of dChi2Tol, but this | |||
maximum provides a backup. | |||
log : TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please complete the TODO 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think as I typed TODO I subconsciously knew I would forget it....
fitFailure = True | ||
if log is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah so THIS is the canonical way to log inside a function like this? Fascinating. (In what weird situation would log be None??)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure, but it looks like that there are a bunch of other places in the stack where the logger is passed around like this. I made it optional because it's possible we would want to use the line profile fitter outside the context of task, in which case you wouldn't have a logger set up.
7f0d771
to
b24e31d
Compare
No description provided.