[Weave] How to associate a trace with a specific run#2401
[Weave] How to associate a trace with a specific run#2401
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
📚 Mintlify Preview Links📝 Changed (1 total)📄 Pages (1)
🤖 Generated automatically when Mintlify deployment succeeds |
🔗 Link Checker Results✅ All links are valid! No broken links were detected. Checked against: https://wb-21fd5541-weave-wb-context.mintlify.app |
anastasiaguspan
left a comment
There was a problem hiding this comment.
Looks great!
Only included nits for adding periods to the end of code comments. Google style requires that complete sentences be punctuated with periods, and code comments that are full sentences should follow standard English punctuation.
...that being said, i see this often not followed on our team, maybe it should be something we discuss and maybe we decide we don't care about this? i might be the only one that does it :)
|
|
||
| client = weave.init("<your-team-name>/<your-project-name>") | ||
|
|
||
| # Associate all subsequent traces with a specific run |
There was a problem hiding this comment.
| # Associate all subsequent traces with a specific run | |
| # Associate all subsequent traces with a specific run. |
| def my_function(x): | ||
| return x * 2 | ||
|
|
||
| my_function(10) # This trace is linked to "my-run-id" at step 5 |
There was a problem hiding this comment.
| my_function(10) # This trace is linked to "my-run-id" at step 5 | |
| my_function(10) # This trace is linked to "my-run-id" at step 5. |
| ```python lines | ||
| client.clear_wandb_run_context() | ||
|
|
||
| my_function(20) # This trace uses the global wandb.run (if any) |
There was a problem hiding this comment.
| my_function(20) # This trace uses the global wandb.run (if any) | |
| my_function(20) # This trace uses the global wandb.run (if any). |
Description
Resolves WBDOCS-992. Documents how to associate traces with a specific W&B run.