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

Refactor: Workflow not a Node, and all Node with as HasIOPreview #360

Open
liamhuber opened this issue Jun 10, 2024 · 0 comments
Open

Refactor: Workflow not a Node, and all Node with as HasIOPreview #360

liamhuber opened this issue Jun 10, 2024 · 0 comments
Assignees

Comments

@liamhuber
Copy link
Member

Right now Workflow(ParentMost, Composite) ultimately inherits from Node and StaticNode(Node, HasIOPreview, ABC) has class-level IO but is a child of Node.

I would like to refactor so that Workflow does not inherit from Node. In this way, everything that's actually a "node" has class-level IO, and that can be a true feature of "nodes". This feature is important for things like node recommendation systems, and just generally a really useful thing to have. Workflow meanwhile is a lot like a Node (they probably need a shared ancestor), but is not one itself -- it always needs to be parent-most in it's graph, and has dynamic IO.

Then we can remove the creator instance from Composite and just have it on Workflow. At that point it should be possible to avoid all the delayed imports we have on Creator (and similar interface classes) and just leverage things directly. This would be great because the current delayed imports really screw up propagating the docstrings! (I'm not 100% sure yet if the reparenting will be sufficient to avoid circular imports or if a few more adjustments will be needed, but I think it will at least be possible.) The interfaces could then eventually be massaged into a formal public API to guide versioning decisions.

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

No branches or pull requests

1 participant