Skip to main content

W&B Summarizer

A humble unofficial microlibrary / command line tool for summarizing data within Weights and Biases across runs including a tiny tool to download ("export") wandb data as a CSV file. This is not endorsed or affiliated with Weights and Biases.


Installation

This package is available via pip and requires Python 3. Simply run the following (optionally within a virtual environment).

$ pip install wandb_summarizer

Usage

This package is usable via the command line or from another Python script. The command line tool takes the following form:

$ wandb-summarizer-to-csv [username/project name] [output loc] [optional verbose flag] [optional query parameters]

Most uses of the microlibrary from another Python script will want to use wandb_summarizer.download.get_results which takes the following parameters:

  • project_name (str): The name of the project to be downloaded. Should be of form username/project.
  • query_param (str): The mongo-like selector to be used in filtering runs. If not provided or None, will download all runs. Defaults to None.
  • api (wandb.Api): The api object to use in requesting run information. If None or not provided, will create a new API access object using default values. Defaults to None.
  • logger (logger.Logger): The logger with which to report debug information. If None or not provided, no messages will be logged. Defaults to None.

Examples

Downloading all runs from sampottinger/who-wrote-this via the command line tool to a CSV file:

$ wandb-summarizer-to-csv sampottinger/who-wrote-this who_wrote_this.csv

Downloading select runs from sampottinger/who-wrote-this via the command line tool to a CSV file with no debug logging:

$ wandb-summarizer-to-csv sampottinger/who-wrote-this who_wrote_this.csv f "{\"config.corpusCol\": \"description\"}"

Downloading run information from sampottinger/who-wrote-this within another Python script:

import wandb_summarizer.download

run_info = wandb_summarizer.download.get_results('sampottinger/who-wrote-this')
print(run_info[0]['url'])

Purpose

This microlibrary builds summary datasets across all or many runs within a Weights and Biases project, reporting statistics from the end of each run as opposed to over time (over epochs) within those runs. This can be used to summarize inputs and results as a tabular data artifact across experiments within a project, supporting iterative model refinement or model selection. For example, users trying different dropout rates or L2 penalty inside a neural network for regularization may be logging those rates within Weights and Biases' config object (wandb.config). The wandb online interface may show those runs in a table with the final results from each but one may wish to visualize information from that table by building a bar chart showing the final validation / training set F1 scores at different dropout rates. As there is no "export table to CSV" option within wandb, one would need to write a custom script to download this data via Python. This microlibrary / command line tool makes it easy to download those results into a flat table for that post-hoc analysis, making it easier to generate results like the following:

L2 Penalty Final Validation Accuracy Final Training Accuracy
0.001 73% 87%
0.01 73% 75%
0.1 56% 55%

Development Standards

All top level methods should be unit tested and have Google style guide conformant docstrings. Please conform to the Google Python Style Guide when possible.


Testing

Automated tests are available and runnable via nosetests like so:

$ nosetests
.........
----------------------------------------------------------------------
Ran 9 tests in 1.331s

OK

Open Source Libraries Used

This uses the wandb client internally under the MIT License.

Release files for wandb-summarizer 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wandb-summarizer 0.1.2
File Size Uploaded
wandb_summarizer-0.1.2.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wandb-summarizer 0.1.2
File Interpreter ABI Platform
wandb_summarizer-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.0 kB

Release files / wandb_summarizer-0.1.2.tar.gz

Download URL wandb_summarizer-0.1.2.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fd43b77fd7111c1e61ee7c46dcd9196c699b3f81742ec299269291db11573f56
BLAKE2b-256 checksum
How to use checksums
621c2cea4682e8e008ad424abb59592998073883ce6f775878aeb51196af4831
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release files / wandb_summarizer-0.1.2-py3-none-any.whl

Download URL wandb_summarizer-0.1.2-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e69ca6e2eb45e88c12ea513d8664f54cdd6838ff70ce58353d5023746192a76d
BLAKE2b-256 checksum
How to use checksums
3f1168d540b25486526c736e1b18cf6ca8dffb40c2703f9705df40a7e84681c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page