wandb.init()
to the beginning of your training script as well as your evaluation script, and each piece would be tracked as a run in W&B.wandb.init()
spawns a new background process to log data to a run, and it also syncs data to wandb.ai by default so you can see live visualizations.wandb.init()
to start a run before logging data with wandb.log()
:wandb.init()
returns a run object, and you can also access the run object via wandb.run
:wandb.finish
to finalize and cleanup the run. However, if you call wandb.init
from a child process, you must explicitly call wandb.finish
at the end of the child process.project
entity
config
wandb.config
, a dictionary-like object for saving inputs to your job, like hyperparameters for a model or settings for a data preprocessing job. The config will show up in a table in the UI that you can use to group, filter, and sort runs. Keys should not contain .
in their names, and values should be under 10 MB. If dict, argparse or absl.flags: will load the key value pairs into the wandb.config
object. If str: will look for a yaml file by that name, and load config from that file into the wandb.config
object.save_code
group
job_type
tags
name
notes
-m
commit message in git. This helps you remember what you were doing when you ran this run.dir
download()
on an artifact, this is the directory where downloaded files will be saved. By default this is the ./wandb
directory.resume
"allow"
, "must"
, "never"
, "auto"
or None
. Defaults to None
. Cases: - None
(default): If the new run has the same ID as a previous run, this run overwrites that data. - "auto"
(or True
): if the preivous run on this machine crashed, automatically resume it. Otherwise, start a new run. - "allow"
: if id is set with init(id="UNIQUE_ID")
or WANDB_RUN_ID="UNIQUE_ID"
and it is identical to a previous run, wandb will automatically resume the run with that id. Otherwise, wandb will start a new run. - "never"
: if id is set with init(id="UNIQUE_ID")
or WANDB_RUN_ID="UNIQUE_ID"
and it is identical to a previous run, wandb will crash. - "must"
: if id is set with init(id="UNIQUE_ID")
or WANDB_RUN_ID="UNIQUE_ID"
and it is identical to a previous run, wandb will automatically resume the run with the id. Otherwise wandb will crash. See our guide to resuming runs for more.reinit
wandb.init()
calls in the same process. (default: False
)magic
False
) You can also pass a dict, json string, or yaml filename.config_exclude_keys
wandb.config
.config_include_keys
wandb.config
.anonymous
"never"
(default): requires you to link your W&B account before tracking the run so you don't accidentally create an anonymous run. - "allow"
: lets a logged-in user track runs with their account, but lets someone who is running the script without a W&B account see the charts in the UI. - "must"
: sends the run to an anonymous account instead of to a signed-up user account.mode
"online"
, "offline"
or "disabled"
. Defaults to online.allow_val_change
wandb.log()
instead. (default: False
in scripts, True
in Jupyter)force
True
, this crashes the script if a user isn't logged in to W&B. If False
, this will let the script run in offline mode if a user isn't logged in to W&B. (default: False
)sync_tensorboard
False
)config
keyword argument to add metadata, like hyperparameters, to your run.