-
Notifications
You must be signed in to change notification settings - Fork 11
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
New class hierarchy and better readiness checking #729
Conversation
Pull Request Test Coverage Report for Build 5535752745
💛 - Coveralls |
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.
I'm fine with these changes, but since this one represents the concept of a node, I would like to see some documentation describing the overall ideas, especially for the most fundamental parts:
- inputs
- outputs
- update / run
And maybe also documentation that explains the specific idea of more technical attributes:
- connect / disconnect
- signals (?)
I was thinking about this last night. Do we want to rename
|
Excellent call. In the process of writing the docs I uncovered all sorts of todos I want to resolve before merging this, so it's back to draft. I'll explicitly ping you again when it's "ready", but of course feel free to critique at any intervening time. At the moment I lean stronger towards my above comment of really having this just be
I'll probably make a separate PR adding more docs/rough spec to the |
Workflow: Composition to inheritance
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Ok @samwaseda, I'm pretty happy with this. It's basically in line with #743 now. You've already seen a bunch of it in the stacks, so I don't know how you want to handle review. Maybe it would be productive for us to have a live Zoom call some time next week and go through the notebook and main docstrings (and possibly the implementations) together? Might be a time-efficient way to find issues here, and also I think we're getting to the point that another brainstorming discussion will be fun and helpful. We could chat briefly after the meeting on Monday to nail down a time for that if you're keen. |
This was necessary to get cyclic workflows to cycle without failing.
Co-authored-by: Sam Dareska <[email protected]>
Co-authored-by: Sam Dareska <[email protected]>
Co-authored-by: Sam Dareska <[email protected]>
# Conflicts: # pyiron_contrib/workflow/node.py
To maintain Workflow as a single point of import
Introduce running on an executor
@samwaseda, it's been a couple weeks so I'm going to go ahead and override the 3-week-old request for changes (adding docs) and merge this. We can patch it as needed if anything made it in that you don't like. |
EDIT: This started as a mixin class so that
Workflow
andMacro
could share code, but got #748 #750 #751 #753 #754 and #755 stacked (and #760), reviewed, and approved on top of it (well, almost approved, at least any explicit comments were addressed in each case).Now this represents an overall refactoring of the workflow code, such that there is a base
Node(ABC)
class, aFunction(Node)
,SingleValue(Function)
andSlow(Function)
branch, and aComposite(Node)
andWorkflow(Composite)
(TBD:Macro(Composite)
) branch.It also includes two changes to functionality:
Function
node that wraps python functions is now "fast" by default -- i.e. it runs on updates and updates on instantiation by default, andSlow
was introduced (justFunction
with different default kwargs) for nodes which should require an explicitrun
callDataNode
, which initializes the datavalue
to a newNotData
class, such thatready
is always false when thevalue is NotData
IMO these changes to the functionality really streamline the pedagogy, and I'm optimistic that the new structure to the code will make it much easier to incorporate
Executor
functionality and to extend things with a niceMacro
class. There are still some rough edges, but the tests are reasonably thorough and passing (on my machine at least, as of writing I'm waiting for the CI here), and the examples are running nicely.