-
Notifications
You must be signed in to change notification settings - Fork 47
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
Fix 636 (2) #638
Fix 636 (2) #638
Conversation
…timization/sampling
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.
👍
pypesto/store/read_from_hdf5.py
Outdated
logger.warning('Loading the problem failed. It is' | ||
'highly likely that no problem exists.') |
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.
logger.warning('Loading the problem failed. It is' | |
'highly likely that no problem exists.') | |
logger.warning('Loading the problem failed. It is' | |
'highly likely that no problem exists ' | |
f'within {filename}.') |
To match the other messages.
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.
As Problem should always be written and read I corrected this to a regular warning that loading the problem failed. As of now I think most problems have amici objectives which have to be created again so that having the problem read in fail is in most cases no hindrance to the code.
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.
Hm then it would be handled differently to sample/optimize/profile results. There, only KeyError
is handled to treat a known issue, and other exceptions would be raised in the usual way. Here, all exceptions are caught and replaced with a logger.warning
. So it may be better/more consistent to remove the try-except for the pypesto.Problem
.
If there is a particular exception in mind here, better to use the specific constant, (e.g. KeyError
instead of Exception
).
Just a small point, fine to ignore.
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.
Think you are right, just removed it as there is no particular exception👍
Codecov Report
@@ Coverage Diff @@
## develop #638 +/- ##
===========================================
+ Coverage 88.16% 89.63% +1.46%
===========================================
Files 79 93 +14
Lines 5257 5912 +655
===========================================
+ Hits 4635 5299 +664
+ Misses 622 613 -9
Continue to review full report at Codecov.
|
adds as a fix to #636