Skip to content

Conversation

liamhuber
Copy link
Member

@liamhuber liamhuber commented Oct 11, 2023

EDIT: Stacked in PRs allow executing Composite nodes in a parallel process; in particular, Macros are now walled-gardens that have their own IO channels instead of the old passing-by-reference that allowed data IO connections to pass through the boundaries of the macro. This didn't get all the way to implementing a pull() method for Function nodes, but most of the pieces are in-place and it's a sufficiently logical spot to merge things.

Comes with a bit of a change in the API, the `run()` call no longer overrides being in a failed state -- you need to reset the failed state first.
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_workflow/refactor_run_cycle

@github-actions
Copy link

github-actions bot commented Oct 11, 2023

Pull Request Test Coverage Report for Build 6601723944

  • 341 of 350 (97.43%) changed or added relevant lines in 10 files are covered.
  • 103 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+0.8%) to 87.447%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyiron_workflow/composite.py 67 68 98.53%
pyiron_workflow/macro.py 44 45 97.78%
pyiron_workflow/util.py 4 5 80.0%
pyiron_workflow/workflow.py 4 5 80.0%
pyiron_workflow/node.py 105 110 95.45%
Files with Coverage Reduction New Missed Lines %
pyiron_workflow/workflow.py 1 93.62%
util.py 1 96.3%
workflow.py 4 84.62%
io.py 7 88.55%
macro.py 9 89.41%
interfaces.py 11 75.0%
function.py 12 91.36%
channels.py 14 91.85%
composite.py 20 91.32%
node.py 24 88.21%
Totals Coverage Status
Change from base Build 6537037442: 0.8%
Covered Lines: 3100
Relevant Lines: 3545

💛 - Coveralls

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codacy-production
Copy link

codacy-production bot commented Oct 11, 2023

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.72% (target: -1.00%) 90.28%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (d69ca78) 1569 1289 82.15%
Head commit (9e7c288) 1757 (+188) 1456 (+167) 82.87% (+0.72%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#23) 319 288 90.28%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

To avoid a difference in meaning to when a node pulls and actually causes upstream executions
And have composite nodes pass just their children (and identify starting nodes) in anticipation of sending composites to an executor
@liamhuber liamhuber added the format_black trigger the Black formatting bot label Oct 12, 2023
liamhuber and others added 26 commits October 19, 2023 10:21
We want to avoid ever having a `concurrent.futures.Executor` as an attribute, because it holds a truly unpickleable thread lock object. Instead, we now pass in information _about_ an executor and instantiate one on the fly if we need it.

In the medium term we'll want a more sophisticated interface, i.e. information about how to connect to some existing executor object, or more detailed information on what type of executor to instantiate. But for the sake of getting workflows to work on executors, this trivially bool is enough.
So that macro and workflow can lean on the same code, and macro can just extend things a little bit to reflect the fact that it needs to rebuild its IO on unpacking children (workflow _always_ rebuilds its IO, so it's a non-issue)
I had a typo in what I wanted to test for, but it turns out that the test is ill-conceived anyhow, because the futures object is returning new instances each time I ask for the `.result()`, so the `.result()` that the macro got internally will differ from the one in the test
These are a little simpler tests, as the workflow can't have siblings it's connected to
I don't know how to update self attributes right now
So that the workflows and macros play well with executors
These can for sure be dropped when support for <=3.10 is dropped, maybe before.
Introduce coupling between input channels
@liamhuber liamhuber changed the title Refactor run cycle EDIT: Executable Composites Oct 22, 2023
@liamhuber liamhuber marked this pull request as ready for review October 22, 2023 04:40
@liamhuber liamhuber merged commit e5a96dc into main Oct 22, 2023
@liamhuber liamhuber deleted the refactor_run_cycle branch October 22, 2023 05:02
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.

2 participants