You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/notes/logging.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ sidebar_label: Weights and Biases Logging
8
8
9
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
10
11
-
## First time setup
11
+
## First time setup
12
12
13
13
To set up wandb, run the following:
14
14
```
15
15
pip install wandb
16
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.
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
18
19
19
```
20
20
wandb login
@@ -28,42 +28,42 @@ training:
28
28
# Weights and Biases control, by default Weights and Biases (wandb) is disabled
29
29
wandb:
30
30
# Whether to use Weights and Biases Logger, (Default: false)
31
-
enabled: false
31
+
enabled: true
32
32
# An entity is a username or team name where you're sending runs.
33
33
# This is necessary if you want to log your metrics to a team account. By default
34
34
# it will log the run to your user account.
35
35
entity: null
36
36
# Project name to be used while logging the experiment with wandb
37
-
wandb_projectname: mmf_${oc.env:USER,}
37
+
project: mmf
38
38
# Experiment/ run name to be used while logging the experiment
39
39
# under the project with wandb
40
-
wandb_runname: ${training.experiment_name}
40
+
name: ${training.experiment_name}
41
41
# Specify other argument values that you want to pass to wandb.init(). Check out the documentation
42
42
# at https://docs.wandb.ai/ref/python/init to see what arguments are available.
43
43
# job_type: 'train'
44
44
# tags: ['tag1', 'tag2']
45
45
env:
46
46
wandb_logdir: ${env:MMF_WANDB_LOGDIR,}
47
-
```
47
+
```
48
48
49
49
* To enable wandb logger the user needs to change the following option in the config.
50
50
51
51
`training.wandb.enabled=True`
52
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.
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
54
55
55
`training.wandb.entity=<teamname/username>`
56
56
57
-
* To give the current experiment a project and run name, user should add these config options.
57
+
* To give the current experiment a project and run name, user should add these config options. The default project name is `mmf` and the default run name is `${training.experiment_name}`.
* To change the path to the directory where wandb metadata would be stored (Default: `env.log_dir`):
63
63
64
64
`env.wandb_logdir=<dir_name>`
65
65
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.
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. Make sure to use the same key name in the config file as defined in the documentation.
0 commit comments