Skip to content

[Weave] How to associate a trace with a specific run#2401

Open
dbrian57 wants to merge 2 commits intomainfrom
weave/wb-context
Open

[Weave] How to associate a trace with a specific run#2401
dbrian57 wants to merge 2 commits intomainfrom
weave/wb-context

Conversation

@dbrian57
Copy link
Copy Markdown
Contributor

@dbrian57 dbrian57 commented Mar 31, 2026

Description

Resolves WBDOCS-992. Documents how to associate traces with a specific W&B run.

@dbrian57 dbrian57 requested a review from a team as a code owner March 31, 2026 21:49
@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 31, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
wandb 🟢 Ready View Preview Mar 31, 2026, 9:54 PM

@github-actions
Copy link
Copy Markdown
Contributor

📚 Mintlify Preview Links

🔗 View Full Preview

📝 Changed (1 total)

📄 Pages (1)

File Preview
weave/guides/tools/weave-in-workspaces.mdx Weave In Workspaces

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: 7897e5b at 2026-03-31 21:55:08 UTC

@github-actions
Copy link
Copy Markdown
Contributor

🔗 Link Checker Results

All links are valid!

No broken links were detected.

Checked against: https://wb-21fd5541-weave-wb-context.mintlify.app

Copy link
Copy Markdown
Contributor

@anastasiaguspan anastasiaguspan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
my_function(20) # This trace uses the global wandb.run (if any)
my_function(20) # This trace uses the global wandb.run (if any).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants