wandb.config
, a dictionary-like object.wandb.config
are usually set by providing a dictionary to the config
argument of wandb.init
. During a sweep, however, any configuration information passed to wandb.init
is instead treated as a default value, which might be over-ridden by the sweep.config.setdefaults
. Code snippets for both methods appear below:entity
(a user or a team) and a project
.wandb sweep
, as part of the sweep configuration YAML file, as environment variables, or via the wandb/settings
file.wandb: WARNING Ignoring project='speech-reconstruction-baseline' passed to wandb.init when running a sweep
wandb.init
call includes the project
argument. That's invalid because sweep and the runs have to be in the same project. The project is set during sweep creation, e.g. bywandb.sweep(sweep_config, project="cat-detector")
400
code from the W&B anaconda
API, like this one:wandb: ERROR Error while calling W&B API: anaconda 400 error: {"code": 400, "message": "TypeError: bad operand type for unary -: 'NoneType'"}
metric
you are optimizing in your configuration YAML file is not a metric that you are logging. For example, you could be optimizing the metric f1
, but logging validation_f1
. Double-check that you're logging the exact metric name that you've asked the sweep to optimize.wandb agent --count 1 SWEEP_ID
in each of your scheduled jobs, which will run a single training job and then exit. This makes it easier to predict runtimes when requesting resources and takes advantage of the parallelism of hyperparameter search.CommError, Run does not exist
?ERROR Error uploading
, you might be setting an ID for your run, e.g. wandb.init(id="some-string")
. This ID needs to be unique in the project, and if it's not unique, the error above will be thrown. In the context of sweeps, you can't set a manual ID for your runs because we're automatically generating random, unique IDs for the runs.name
instead of id.
For example:Cuda out of memory
?train.py
, then the following should work:program
key to your sweep config, for example, program: train.py
wandb.agent(...)
inside of python, call it from the command line: wandb agent SWEEP_ID
. This will launch each trial in a separate process which should guarantee you don't hold onto any memory.command
key in the YAML file, like so:${args}
key expands to all the parameters in the sweep configuration file, expanded so they can be parsed by argparse: --param1 value1 --param2 value2
argparse
you can use:python
might point to Python 2. To ensure Python 3 is invoked, just use python3
instead of python
when configuring the command:nu
parameter set to 1.5
-- this corresponds to much a weaker smoothness assumption than for the radial basis function (RBF) kernel. For details on kernels in Gaussian processes, see Chapter 4 of Rasmussen and Williams or the scikit-learn docs linked above.wandb agent
command terminating when I pause the sweep?${args_no_boolean_flags}
macro in the command section of the config. This will automatically pass in any boolean parameters as flags: when param
is True
the command will receive --param
, when param
is False
the flag will be omitted. sweep_id
to a place that any potential agent can read and a way for these agents to consume this sweep_id
and start running.wandb agent
. For instance, bring up an EC2 instance and then call wandb agent
on it. In this case, you might use an SQS queue to broadcast sweep_id
to a few EC2 instances and then have them consume the sweep_id
from the queue and start running.WANDB_DIR
. For example:wandb.log_code()
after you have initialised your wandb run. This is necessary even when you have enabled code logging in the settings page of your W&B profile in the app. For more advanced code logging, see the docs for wandb.log_code()
here​