Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@
"weave/guides/tracking/costs",
"weave/guides/tools/saved-views",
"weave/guides/tracking/trace-plots",
"weave/guides/tracking/trace-to-run",
"weave/guides/tools/weave-in-workspaces"
]
},
Expand Down Expand Up @@ -6406,6 +6405,10 @@
"destination": "/weave/agent-integration-quickstart",
"source": "/weave/guides/tracking/trace-agent-integrations"
},
{
"destination": "/weave/guides/tools/weave-in-workspaces",
"source": "/weave/guides/tracking/trace-to-run"
},
{
"destination": "/:slug*",
"source": "/_print/:slug*"
Expand Down
17 changes: 16 additions & 1 deletion weave/guides/tools/weave-in-workspaces.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Use Weave with W&B training runs"
description: "Integrate Weave traces with W&B training runs to view function execution details alongside ML metrics in workspace dashboards."
keywords: ["workspaces", "training runs", "traces", "wandb.run", "artifacts"]
keywords: ["workspaces", "training runs", "traces", "wandb.run", "wandb.init", "trace linking", "experiment tracking", "artifacts"]
---

# Log traces during model training runs
Expand Down Expand Up @@ -88,6 +88,21 @@ To navigate to a workspace from the UI:

For more information about workspaces, see [View experiments results](https://docs.wandb.ai/models/track/workspaces).

## View a linked run in the Traces table

When you call a function decorated with `@weave.op` inside a `wandb.init()` context, Weave automatically associates the trace with the active [W&B run](/models/runs). The **Traces** table in the Weave UI links each trace to its associated runs.

To view the runs linked to your traces:

1. Run a script that calls traced functions inside a `wandb.init()` context, such as the training example in [Use Weave panels](#use-weave-panels).
2. Navigate to the [W&B app](https://wandb.ai) and select your project.
3. In the **Weave** project sidebar, click **Traces**. The **Traces** table displays links to any associated runs.
4. Open a trace from the **Traces** table to inspect the linked W&B run and review its experiment context.

<Note>
Linking traces to W&B runs is not yet available in the TypeScript SDK.
</Note>

## Associate traces with a specific W&B run

In some cases, you may want to attach traces to a run other than the one Weave detects automatically. By default, Weave automatically detects and associates traces with the active `wandb.run`. If you need to associate traces with a specific run that isn't the global `wandb.run`, use `set_wandb_run_context`. To associate traces with a specific run and run step, define values for the method's `run_id` and `step` arguments:
Expand Down
94 changes: 0 additions & 94 deletions weave/guides/tracking/trace-to-run.mdx

This file was deleted.

Loading