Skip to content
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

Merged
merged 2 commits into from Dec 20, 2023
Merged

DM-41900: Catch Cholesky failures #872

merged 2 commits into from Dec 20, 2023

Conversation

cmsaunders
Copy link
Contributor

No description provided.

Copy link
Contributor

@mrawls mrawls left a 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 ;)

@cmsaunders cmsaunders force-pushed the tickets/DM-41900 branch 2 times, most recently from e46f3cf to 7f0d771 Compare December 20, 2023 20:42
Copy link
Contributor

@mrawls mrawls left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please complete the TODO 😄

Copy link
Contributor Author

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:
Copy link
Contributor

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??)

Copy link
Contributor Author

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.

@cmsaunders cmsaunders merged commit 1ef1c00 into main Dec 20, 2023
2 checks passed
@cmsaunders cmsaunders deleted the tickets/DM-41900 branch December 20, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants