-
Notifications
You must be signed in to change notification settings - Fork 46
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
Deprecate preserve_exception_message
in dials.util.mp
#1722
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.
Sane and sensible - I cannot imagine a use case where not preserving the exception makes things better.
@@ -53,7 +54,7 @@ def parallel_map( | |||
asynchronous=True, | |||
callback=None, | |||
preserve_order=True, | |||
preserve_exception_message=True, | |||
preserve_exception_message=..., |
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.
TIL
@@ -63,6 +64,13 @@ def parallel_map( | |||
""" | |||
from dials.util.cluster_map import cluster_map as drmaa_parallel_map | |||
|
|||
if preserve_exception_message is not Ellipsis: |
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.
OK, this is a really nice use of a NIL value which is not truth-like.
@@ -83,7 +91,7 @@ def parallel_map( | |||
qsub_command=qsub_command, | |||
asynchronous=asynchronous, | |||
preserve_order=preserve_order, | |||
preserve_exception_message=preserve_exception_message, | |||
preserve_exception_message=True, |
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.
Shouldn't it be removed from drmaa_parallel_map
while we're there?
Codecov Report
@@ Coverage Diff @@
## main #1722 +/- ##
==========================================
- Coverage 67.14% 67.13% -0.01%
==========================================
Files 615 615
Lines 69053 69059 +6
Branches 9616 9619 +3
==========================================
- Hits 46365 46364 -1
- Misses 20756 20760 +4
- Partials 1932 1935 +3 |
I believe there exists no sensible scenario in which this would be set to
False
.