-
Notifications
You must be signed in to change notification settings - Fork 135
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
[WIP] feat: build FunctionGraph from functions #1271
base: main
Are you sure you want to change the base?
Conversation
Hey -- sorry, it's been a bit, will be looking over soon! |
@@ -143,7 +143,7 @@ def update_dependencies( | |||
|
|||
|
|||
def create_function_graph( |
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.
The type signature of this should be updated.
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.
also 🤦 (at myself I think) that the name of this function and what it returns - a dict, not a function graph...
Yeah so what's left? This ?
|
My expectation # module Z
# some funcs
# module 1
def func1( ...) -> ...:
...
# module 1, or perhaps another module 2
def func2(...)->...:
...
# driver code somewhere else or in one of the modules - importing things appropriately
funcs = [func1, func2]
driver.Builder().with_modules(module_z, *funcs)... # this should work it should also work with |
I saw the note in #1271:
FYI I attempted this with this branch, but it returns |
@leblancfg You're ahead of us! Will open a separate PR and share my marimo development pattern once this is merged. Feel free to discuss here #1274 |
OK, That said -- in order to have function overrides, we should probably want to combine |
Disagree. I think this will make things more confusing, as it will:
I think extending |
Changes
graph.create_function_graph()
instead ofgraph.FunctionGraph.from_modules()
needed to be updated.graph.create_function_graph()
was modified, but it was never advertised as a public API. Further rewiring could provide full backwards compatibility (could do after validating the general solution)TODO
create_function_graph()
for fully backwards-compatible APiHow I tested this
Notes
graph.create_function_graph()
should really return aFunctionGraph
instead of adict