Skip to content

Commit a97cf2a

Browse files
committed
update docs
1 parent a0decd2 commit a97cf2a

File tree

1 file changed

+45
-12
lines changed

1 file changed

+45
-12
lines changed

website/docs/notes/logging.md

Lines changed: 45 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,75 @@
11
---
2-
id: concepts
3-
title: Terminology and Concepts
4-
sidebar_label: Terminology and Concepts
2+
id: logger
3+
title: Weights and Biases Logging
4+
sidebar_label: Weights and Biases Logging
55
---
66

77
## Weights and Biases Logger
88

9-
MMF has a `WandbLogger` class which lets the user to log their model's progress using [Weights and Biases](https://gitbook-docs.wandb.ai/).
9+
MMF now has a `WandbLogger` class which lets the user to log their model's progress using [Weights and Biases](https://wandb.ai/site). Enable this logger to automatically log the training/validation metrics, system (GPU and CPU) metrics and configuration parameters.
10+
11+
## First time setup
1012

1113
To set up wandb, run the following:
1214
```
1315
pip install wandb
16+
```
17+
In order to log anything to the W&B server you need to authenticate the machine with W&B **API key**. You can create a new account by going to https://wandb.ai/signup which will generate an API key. If you are an existing user you can retrieve your key from https://wandb.ai/authorize. You only need to supply your key once, and then it is remembered on the same device.
18+
19+
```
1420
wandb login
1521
```
1622

23+
## W&B config parameters
24+
1725
The following options are available in config to enable and customize the wandb logging:
1826
```yaml
1927
training:
2028
# Weights and Biases control, by default Weights and Biases (wandb) is disabled
2129
wandb:
2230
# Whether to use Weights and Biases Logger, (Default: false)
2331
enabled: false
32+
# An entity is a username or team name where you're sending runs.
33+
# This is necessary if you want to log your metrics to a team account. By default
34+
# it will log the run to your user account.
35+
entity: null
2436
# Project name to be used while logging the experiment with wandb
25-
wandb_projectname: mmf_${oc.env:USER}
37+
wandb_projectname: mmf_${oc.env:USER,}
2638
# Experiment/ run name to be used while logging the experiment
2739
# under the project with wandb
2840
wandb_runname: ${training.experiment_name}
41+
# Specify other argument values that you want to pass to wandb.init(). Check out the documentation
42+
# at https://docs.wandb.ai/ref/python/init to see what arguments are available.
43+
# job_type: 'train'
44+
# tags: ['tag1', 'tag2']
2945
env:
3046
wandb_logdir: ${env:MMF_WANDB_LOGDIR,}
31-
```
32-
To enable wandb logger the user needs to change the following option in the config.
47+
```
48+
49+
* To enable wandb logger the user needs to change the following option in the config.
50+
51+
`training.wandb.enabled=True`
52+
53+
* To give the `entity` which is the name of the team or the username, the user needs to change the following option in the config. In case no `entity` is provided, the data will be logged to the `entity` set as default in the user's settings.
54+
55+
`training.wandb.entity=<teamname/username>`
56+
57+
* To give the current experiment a project and run name, user should add these config options.
58+
59+
`training.wandb.wandb_projectname=<ProjectName>` <br>
60+
`training.wandb.wandb_runname=<RunName>`
61+
62+
* To change the path to the directory where wandb metadata would be stored (Default: `env.log_dir`):
3363

34-
`training.wandb.enabled=True`
64+
`env.wandb_logdir=<dir_name>`
3565

36-
To give the current experiment a project and run name, user should add these config options.
66+
* To provide extra arguments to `wandb.init()`, the user just needs to define them in the config file. Check out the documentation at https://docs.wandb.ai/ref/python/init to see what arguments are available. An example is shown in the config parameter shown above.
3767

38-
`training.wandb.wandb_projectname=<ProjectName> training.wandb.wandb_runname=<RunName>`
68+
## Current features
3969

40-
To change the path to the directory where wandb metadata would be stored (Default: `env.log_dir`):
70+
The following features are currently supported by the `WandbLogger`:
4171

42-
`env.wandb_logdir=<dir_name>`
72+
* Training & Validation metrics
73+
* Learning Rate over time
74+
* GPU: Type, GPU Utilization, power, temperature, CUDA memory usage
75+
* Log configuration parameters

0 commit comments

Comments
 (0)