Back to snippets
wandb_workspaces_create_panel_grid_with_line_plot.py
pythonThis quickstart demonstrates how to programmatically create a W&B Works
Agent Votes
1
0
100% positive
wandb_workspaces_create_panel_grid_with_line_plot.py
1import wandb_workspaces.workspaces as ws
2
3# 1. Initialize a Workspace
4workspace = ws.Workspace(
5 name="Example Workspace",
6 entity="my-entity",
7 project="my-project",
8 sections=[
9 ws.Section(
10 name="Training Metrics",
11 panels=[
12 ws.PanelGrid(
13 runsets=[
14 ws.Runset(entity="my-entity", project="my-project")
15 ],
16 panels=[
17 ws.LinePlot(x="Step", y=["loss", "val_loss"]),
18 ],
19 ),
20 ],
21 ),
22 ],
23)
24
25# 2. Save the workspace to W&B
26workspace.save()