-
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
Fix dials.cosym target fail bug #1993
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #1993 +/- ##
==========================================
- Coverage 68.82% 68.82% -0.01%
==========================================
Files 649 649
Lines 75294 75318 +24
Branches 10782 10787 +5
==========================================
+ Hits 51824 51835 +11
- Misses 21446 21458 +12
- Partials 2024 2025 +1 |
rjgildea
approved these changes
Feb 21, 2022
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.
Thanks for the bug fix and moving tests to use pathlib.Path
. A few very minor comments about the pathlib usage, but otherwise looks good to me 👍
Co-authored-by: Richard Gildea <rjgildea@users.noreply.github.com>
jbeilstenedmands
force-pushed
the
cosym_target_fail_bug
branch
from
February 21, 2022 12:02
a230e07
to
c132201
Compare
ndevenish
pushed a commit
that referenced
this pull request
Feb 21, 2022
In rare cases, a low resolution cutoff in the resolution filter caused at least one full dataset to be removed, leading to a crash during minimisation.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In
dials.cosym
, I found a case where a low resolution cutoff in the resolution filter caused at least one full dataset to be removed, leading to a stacktrace during the minimisation at:Of course a suitable d_min could just be set, but I still thought it would be good to avoid crashing out and handle this more gracefully.
I have added a test to reproduce this, and the fix is fairly straightforward, just making sure to use the correct number of datasets in the procedure (which could be reduced compared to upon initialisation). In the example test, only 7/8 datasets remain after the resolution filter, so only 7 reindexing operators can be determined. The only outstanding question is whether the filtered-out dataset should remain in the output
refl
,expt
files. As no reindexing operator can be determined, I don't believe they should, so this proposed changeset removes them as they may not be consistently indexed.p.s. I updated all the tests to use
pathlib
objects