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

Hash change guards #698

Merged
merged 30 commits into from
Mar 8, 2024
Merged

Hash change guards #698

merged 30 commits into from
Mar 8, 2024

Conversation

tclose
Copy link
Contributor

@tclose tclose commented Sep 11, 2023

Types of changes

  • New feature (non-breaking change which adds functionality)

Summary

Addresses #681 issue

  • Detects changes in the hashes of task/workflow inputs and raises informative error messages identifying which fields have changed
  • Reinstates behaviour of "blocked tasks" unittest, so it once again triggers "graph is not empty" exception
  • On "graph not empty" exception, check Workflow.inputs._graph_checksums to determine which task's checksums have changed and raise informative message

Checklist

  • I have added tests to cover my changes (if necessary)

@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Attention: Patch coverage is 97.05882% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 83.93%. Comparing base (0e66136) to head (ff281aa).

Files Patch % Lines
pydra/engine/submitter.py 88.23% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #698      +/-   ##
==========================================
+ Coverage   83.65%   83.93%   +0.27%     
==========================================
  Files          24       24              
  Lines        4986     5029      +43     
  Branches     1416     1429      +13     
==========================================
+ Hits         4171     4221      +50     
+ Misses        809      802       -7     
  Partials        6        6              
Flag Coverage Δ
unittests 83.93% <97.05%> (+0.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@tclose tclose marked this pull request as ready for review September 11, 2023 12:22
@tclose
Copy link
Contributor Author

tclose commented Sep 11, 2023

I believe this is good for review now. The new SLURM test keeps on getting stuck somewhere but I assume that it isn't related

@tclose
Copy link
Contributor Author

tclose commented Sep 12, 2023

NB: I'm not sure why the coverage is down. It seems to be an issue with the dask submitter code

Copy link
Collaborator

@ghisvail ghisvail left a comment

Choose a reason for hiding this comment

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

LGTM with minor comments / questions which might be due to my own ignorance or overlook.

pydra/engine/submitter.py Outdated Show resolved Hide resolved
pydra/engine/tests/test_specs.py Show resolved Hide resolved
pydra/engine/tests/test_specs.py Show resolved Hide resolved
@djarecka
Copy link
Collaborator

indeed looks like the coverage has dropped, what is weird, since for some time we didn't test Dask at all...

Copy link
Collaborator

@djarecka djarecka left a comment

Choose a reason for hiding this comment

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

Thank you! I think it is really a great improvement to the debugging options for Pydra

@tclose
Copy link
Contributor Author

tclose commented Sep 25, 2023

indeed looks like the coverage has dropped, what is weird, since for some time we didn't test Dask at all...

I don't trust codecov in this instance (and others). The dask test is passing so it couldn't be missing the Dask submitter, which is where the bulk of the coverage drop comes from (otherwise it would be a coverage increase I believe)

Copy link
Contributor

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Thanks for your patience. Overall it seems to do the job. I think cleaner approaches could be worked out, but nothing here will prevent coming up with them later.

A couple small suggestions.

pydra/utils/hash.py Outdated Show resolved Hide resolved
pydra/utils/hash.py Show resolved Hide resolved
pydra/engine/tests/test_submitter.py Show resolved Hide resolved
pydra/engine/tests/test_submitter.py Outdated Show resolved Hide resolved
pydra/engine/core.py Outdated Show resolved Hide resolved
pydra/engine/core.py Outdated Show resolved Hide resolved
Copy link
Contributor

@effigies effigies left a comment

Choose a reason for hiding this comment

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

I guess I could have made suggestions...

pydra/engine/tests/test_submitter.py Show resolved Hide resolved
pydra/engine/tests/test_submitter.py Outdated Show resolved Hide resolved
@tclose
Copy link
Contributor Author

tclose commented Feb 29, 2024

@djarecka I believe this is ready to merge now

@djarecka
Copy link
Collaborator

djarecka commented Mar 7, 2024

I'm good with merging, thank you @tclose !

@tclose tclose merged commit ff01e4c into nipype:master Mar 8, 2024
43 checks passed
@tclose tclose deleted the hash-change-guards branch March 8, 2024 05:56
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.

5 participants