wandb / wandb-workspaces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool



wandb-workspaces

PyPI CircleCI codecov

wandb-workspaces is a Python library for programatically working with Weights & Biases workspaces and reports.

Quickstart

1. Install

pip install wandb-workspaces

OR, you can install this as an extra from the wandb library:

pip install wandb[workspaces]

2. Create a workspace

import wandb_workspaces.workspaces as ws

workspace = ws.Workspace(
   name="Example W&B Workspace",
   entity="your-entity",
   project="your-project",
   sections=[
      ws.Section(
            name="Validation Metrics",
            panels=[
               wr.LinePlot(x="Step", y=["val_loss"]),
               wr.BarPlot(metrics=["val_accuracy"]),
               wr.ScalarChart(metric="f1_score", groupby_aggfunc="mean"),
            ],
            is_open=True,
      ),
   ],
).save()

image

3. Create a report

import wandb_workspaces.reports as wr

report = wr.Report(
    entity="your-entity",
    project="your-project",
    title="Example W&B Report",
    blocks=[
        wr.H1("This is a heading"),
        wr.P("Some amazing insightful text about your project"),
        wr.H2(
            "This heading is collapsed",
            collapsed_blocks=[wr.P("Our model is great!")],
        ),
        wr.PanelGrid(
            panels=[
                wr.LinePlot(x="Step", y=["val_loss"]),
                wr.BarPlot(metrics=["val_accuracy"]),
                wr.ScalarChart(metric="f1_score", groupby_aggfunc="mean"),
            ]
        ),
    ],
).save()

image

More examples

See examples for more detailed usage.

About

License:Apache License 2.0


Languages

Language:Python 99.2%Language:Shell 0.5%Language:Makefile 0.2%