Notebooks
W
Weights and Biases
Report API Quickstart

Report API Quickstart

introwandb-examplescolabs

Open In Colab

Weights & Biases

📝 W&B Report API

Programmatically create, manage, and customize Reports by defining configurations, panel layouts, and runsets with the wandb-workspaces W&B library. Load and modify Reports with URLs, filter and group runs using expressions, and customize run appearances using Report templates.

wandb-workspaces is a Python library for programmatically creating and customizing W&B Workspaces and Reports.

In this tutorial you will see how to use wandb-workspaces to create and customize W&B Reports.

[ ]
[ ]
LOG_DUMMY_RUNS
True
PROJECT
LINEAGE_PROJECT

🚀 Quickstart!

[ ]

Create, save, and load reports

  • NOTE: Reports are not saved automatically to reduce clutter. Explicitly save the report by calling report.save()
[ ]

Add content via blocks

  • Use blocks to add content like text, images, code, and more
  • See wr.blocks for all available blocks
[ ]

Add charts and more via Panel Grid

  • PanelGrid is a special type of block that holds runsets and panels
    • runsets organize data logged to W&B
    • panels visualize runset data. For a full set of panels, see wr.panels
[ ]

Add data lineage with Artifact blocks

  • There are equivalent weave panels as well
[ ]

Customize run colors

  • Pass in a dict[run_name, color]
[ ]

❓ FAQ

My report is too wide/narrow

  • Change the report's width to the right size for you.
[ ]

How do I resize panels?

  • Pass a dict[dim, int] to panel.layout
  • dim is a dimension, which can be x, y (the coordiantes of the top left corner) w, h (the size of the panel)
  • You can pass any or all dimensions at once
  • The space between two dots in a panel grid is 2.
[ ]

What blocks are available?

  • See wr.blocks for a list of blocks.
  • In an IDE or notebook, you can also do wr.blocks.<tab> to get autocomplete.
[ ]

What panels are available?

  • See wr.panels for a list of panels
  • In an IDE or notebook, you can also do wr.panels.<tab> to get autocomplete.
  • Panels have a lot of settings. Inspect the panel to see what you can do!
[ ]

How can I link related reports together?

  • Suppose have have two reports like below:
[ ]

Combine blocks into a new report

[ ]
[ ]

I tried mutating an object in list but it didn't work!

tl;dr: It should always work if you assign a value to the attribute instead of mutating. If you really need to mutate, do it before assignment.


This can happen in a few places that contain lists of wandb objects, e.g.:

  • report.blocks
  • panel_grid.panels
  • panel_grid.runsets
[ ]

Good: Assign b

[ ]

Bad: Mutate b without reassigning

[ ]

Good: Mutate b and then reassign it

[ ]