Conversation
|
OK, I like the API. I think the implementation is overly built towards the current way it works. From what I understand:
IMO this should:
So, how would this work? Idea:
Alternatively (and this is cleaner, but we have to be careful with some of the SDK stuff, or just say only use the builder/adapter API):
Then we can put more logic in the builder. Perhaps the simplest solution might be:
I think this is the easiest, and will save on complexity. Regarding multiple versions that is, IMO, too complex now. We should add it later? |
|
I'm in favor of seeing if we can make it part of the constructor with this approach. That way post graph construct is only called once. |
skrawcz
left a comment
There was a problem hiding this comment.
I think this looks good. Just need to fix the pre-commit hook.
Following #877
Added the ability to add materializer nodes to the
FunctionGraphatDriverbuild time.Use cases:
.display_all_functions().execute(). Would allow some users to completely ignore.materialize()dr.materialize()Changes
.with_materializers(*materializers)Builder.build()adds materializer nodes after creating theDriverand returns the updated Driver. The logic is derived fromDriver.materialize()Builder.copy()copies the materializersHow I tested this
Notes
post_graph_constructhooks are triggeredversionhashing of the dataflow? should we treat "static" and "dynamic" differently. IMO, we might want two create two versions: one for "the dataflow transform, ignoring materializers" and one for "all nodes" since they answer different equality / diffing questionsBuilder.build()andDriver.materialize(). A better approach could be to haveDriver.add_materializers()andDriver.execute_materializers(). BothBuilder.build()andDriver.materialize()could callDriver.add_materializers()targetordependencies(type and name) to connect to.