-
Notifications
You must be signed in to change notification settings - Fork 63
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
chore(weave): Unit Tests for stack management #1738
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=a082e2cdea7a668d4df762517bb0420a56c1e262 |
weave/tests/test_client_trace.py
Outdated
parent_to_children_map = {} | ||
roots = [] | ||
for call in calls: | ||
if call.parent_id not in parent_to_children_map: |
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.
defaultdict
👀
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 POP_REORDERS_STACK: |
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.
interesting....
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.
I agree with the comment.
This PR adds a bunch of unit tests for stack management. Currently the tests pass without code changes. However, given that this area of the code is likely going to get changed soon, i wanted to introduce a few tests to ensure everything is managed correctly.