-
Notifications
You must be signed in to change notification settings - Fork 123
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 path viz & lineage example #174
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Splitting into user nodes is now obsolete with the node_modifiers dictionary. So this refactors the code internally to remove the `user_nodes` argument, and instead pass in all nodes with the appropriate node modifiers. I seemed to also fix a bug that's been there in the dot file metadata -- in that the test was adding two nodes for the same function.
This is useful for debugging and zooming in on a particular path. People who want to get more out of lineage will want to use this function to help them document, debug, and understand how particular things are related.
This does not return the actual order of nodes that represents the path, because that seems more trouble than it's worth. Instead it'll return the list of nodes that constitute the path. This should suffice for someone to inspect tags.
Didn't sound right without the `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.
LGTM -- some small nits
We have a `display_downstream_of` function, so there should be an analogous `display_upstream_of` function. It behaves the same. Tested locally.
This adds documentation and code examples on how to utilize Hamilton's lineage capabilities. There will be a couple follow up commits to change the example to so that people can go back in time to this current state and compare how things have changed.
This shows some changes to the Titanic DAG. This is what people will play with. Once everything is merged we'll update the README so that people can go back to the prior commit and run the same code.
We're doing this for consistency, since this complements `get_upstream_nodes`. This is fine to change, since the `graph.py` module is seen an internal API and not a publicly facing one. But just in case someone is somehow using it, I'm leaving it in, and delegating to the new function with a warning message.
This is to house the possible visual modifiers for a node. This is an enum to (1) keep them grouped, (2) they were being used in a boolean fashion, so the presence of the enum is enough.
elijahbenizzy
approved these changes
May 25, 2023
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.
🚢 🇮🇹
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds path visualization and refactors the internal graphviz function a little.
Changes
How I tested this
Notes
Checklist