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
Add ComponentGraph class #1415
Add ComponentGraph class #1415
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1415 +/- ##
=========================================
+ Coverage 100.0% 100.0% +0.1%
=========================================
Files 230 232 +2
Lines 15831 16430 +599
=========================================
+ Hits 15823 16422 +599
Misses 8 8
Continue to review full report at Codecov.
|
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.
@eccabay this is huge!! Nice going, this API is looking great. Very excited to get it into the pipelines! I really like the way we use that recompute
method, and I think that from_list
method is gonna be super helpful. The try-first-and-fail logic in graph
is neat.
I left some comments and suggestions. I didn't dig into the tests yet, will do so on next pass. Some things to call out:
- I think we should have public methods for fitting and predicting. They could certainly share impl.
- I think we should keep the user-defined
component_dict
completely separate from whatever structure we use to hold the component instances. That way, thecomponent_dict
holds the template for the graph. I supposeadd_node
andadd_edge
would have to modify that structure.
I can also see us wanting to evaluate part(s) of the graph, i.e. call transform
on all preprocessing features. We don't have to add that to this PR, but I think that would be great to file as something to add once the DAGs work is complete.
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.
Just leaving tiny comments for now, would love to take a closer look when I get the chance later 😁
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 implementation looks great, and the tests are awesome! Just had a few questions/comments.
I agree with Dylan about submitting an issue to track the caching for this class, since the current cache might run into memory issues.
There currently is no implementation for adding additional nodes or adding two graphs together, as mentioned in the original issue, is there? Not sure if I missed something, but might be nice to file an issue to track adding those two!
Also, not sure if this was intentional, but this class hasn't been added to the docs yet.
Otherwise, I left a few comments, but looks good to me!
@bchen1116 good point, already filed! (idk if my prev comment mentioned this) #466 |
Great point @bchen1116! I did remove these capabilities as I iterated through this PR. With the decision for the |
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.
@eccabay solid work on this!! 🎉
Here's all that I found which I'd consider blocking:
- I proposed a simplification in
compute_final_component_features
/_compute_features
, so that we have one evaluation impl instead of two. - I left a few little suggested cleanups in
_compute_features
.
graph.node(component_name, shape='record', label=label) | ||
edges = self._get_edges() | ||
graph.edges(edges) | ||
return 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.
If you have any example images handy it would be cool to see what this looks like!
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.
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.
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.
Ooooooh. This rocks. Thanks!
Closes #1277 (design doc here)