Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 2.72 KB

DEVELOPMENT.md

File metadata and controls

66 lines (47 loc) · 2.72 KB


Development

CLI and Library

Setup

git clone git@github.com:wandb/client.git
cd client
pip install -e .
pip install -r requirements_dev.txt

Architecture

When wandb.init() is called from a user script, communication with a seperate wandb process is coordinated. This is done by creating a pty for stdout and stderr, listening for file change events, and sending signals over a socket. If a script is started with wandb run the wandb process is started immediately and the user process is started by it. If the script is run directly, the wandb process is started from wandb.init(). Communication with the WandB cloud only occurs when wandb run is used, or WANDB_MODE=run is set in the environment.

Special Files

The following files may be created by the wandb library in the run directory:

description.md
Experiment notes specified with wandb run -m 'My notes' or edited via the local web server.
wandb-metadata.json
Data about the run such as git commit, program name, host, directory, exit code, etc.
wandb-summary.json
The latest summary metrics generated either from run.history.add(...) or run.summary.update(...)
wandb-history.jsonl
The history metrics added via our callbacks, or manually with run.history.add(...)
wandb-events.jsonl
System metrics are automatically stored every 30 seconds. This file can contain custom user metrics as weel
diff.patch
A git diff of any un-commited changes
config.yaml
The config parameters specified in run.config.update(...)
output.log
The stdout and stderr collected during the run

WandB Board

WandB Board consists of 2 components: a Flask app which reads from the local filesystem and serves up a Graphql endpoint, and a React based frontend.

Setup

cd wandb/board/ui
yarn install

Running the development servers

The flask app can be started in development mode from a directory containing a wandb directory with WANDB_ENV=dev wandb board. This will automatically reload when changes are made. The frontend can be run by calling yarn start from the wandb/board/ui directory, you can then access the frontend at http://localhost:3000 by default.

Running tests

The backend tests can be run via pytest in the root directory. The frontend tests are run with yarn run from the wandb/board/ui directory.

Contributing

We love pull requests, show us what you're thinking!