-
Notifications
You must be signed in to change notification settings - Fork 62
changes in checksums/results and some fixes (fixes#107) #130
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
Conversation
… it in Task.results(), removing self.results_dict
…after the workflow is addded to another workflow, fixing nipype#107
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
==========================================
- Coverage 87.08% 87.08% -0.01%
==========================================
Files 16 16
Lines 2339 2354 +15
Branches 574 580 +6
==========================================
+ Hits 2037 2050 +13
- Misses 207 208 +1
- Partials 95 96 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #130 +/- ##
=========================================
+ Coverage 87.08% 87.1% +0.01%
=========================================
Files 16 16
Lines 2339 2358 +19
Branches 574 583 +9
=========================================
+ Hits 2037 2054 +17
- Misses 207 208 +1
- Partials 95 96 +1
Continue to review full report at Codecov.
|
pydra/engine/core.py
Outdated
|
|
||
| def _run(self, **kwargs): | ||
| self.inputs = dc.replace(self.inputs, **kwargs) | ||
| # self.inputs = dc.replace(self.inputs, **kwargs) don't need it? |
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.
this was there to ensure that inputs could be set via the run command (when it was not a private function) or as a function call. as long as this is the case within __call__ it would be ok to remove this. i.e. a user should be able to set inputs during the call to a task (much like a python function).
if **kwargs is not being used, it should be removed.
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.
oh, i see, we have kwargs in the __call__ that is passing to _run, but had no tests for it, so I couldn't find who is using this. will keep it and add a test
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.
added a test
pydra/engine/core.py
Outdated
| """adding a task to the workflow""" | ||
| if not is_task(task): | ||
| raise ValueError("Unknown workflow element: {!r}".format(task)) | ||
| task._reset() |
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.
does this need to happen at every add call? or could this be done just prior to run or perhaps more preferably at the end of a run?
|
|
||
| async def _run(self, submitter=None, **kwargs): | ||
| self.inputs = dc.replace(self.inputs, **kwargs) | ||
| # self.inputs = dc.replace(self.inputs, **kwargs) don't need it? |
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.
same question as before.
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.
we do not allow running a workflow without a submitter, so I believe this can't be used
|
overall looks good. the only question i have is whether the reset can be called at the end of a run by the submitter, instead of during checksum1 = task.checksum
result = task(param1=2, param2=3)
checksum2 = task.checksum
assert checksum1 == checksum2 |
|
@satra - I'm just working on moving the |
…firm that worflowas that run twice do not create additional output_dir
…ly is set only at the beginning of execution after the graph is sorted) and adding it if needed
|
@satra - at the end I just moved about comparing the |
satra
left a comment
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.
LGTM. thank you for tracking this down.
Types of changes
Summary
removing results_dict and using a new method
checksum_statesto get all checksumsrestarting connections after running workflows
test for workflows that are run twice (and use results right away)
closes workflow_as_node does not update the input (if it was run already) #107
Checklist
(we are using
black: you canpip install pre-commit,run
pre-commit installin thepydradirectoryand
blackwill be run automatically with each commit)Acknowledgment