This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Command Line Interface

Usage

wandb [OPTIONS] COMMAND [ARGS]...

Options

Option Description
–version Show the version and exit.

Commands

Command Description
agent Run the W&B agent
artifact Commands for interacting with artifacts
beta Beta versions of wandb CLI commands.
controller Run the W&B local sweep controller
disabled Disable W&B.
docker Run your code in a docker container.
docker-run Wrap docker run and adds WANDB_API_KEY and WANDB_DOCKER…
enabled Enable W&B.
init Configure a directory with Weights & Biases
job Commands for managing and viewing W&B jobs
launch Launch or queue a W&B Job.
launch-agent Run a W&B launch agent.
launch-sweep Run a W&B launch sweep (Experimental).
login Login to Weights & Biases
offline Disable W&B sync
online Enable W&B sync
pull Pull files from Weights & Biases
restore Restore code, config and docker state for a run
scheduler Run a W&B launch sweep scheduler (Experimental)
server Commands for operating a local W&B server
status Show configuration settings
sweep Initialize a hyperparameter sweep.
sync Upload an offline training directory to W&B
verify Verify your local instance

1 - wandb agent

Usage

wandb agent [OPTIONS] SWEEP_ID

Summary

Run the W&B agent

Options

Option Description
-p, –project The name of the project where W&B runs created from the sweep are sent to. If the project is not specified, the run is sent to a project labeled ‘Uncategorized’.
-e, –entity The username or team name where you want to send W&B runs created by the sweep to. Ensure that the entity you specify already exists. If you don’t specify an entity, the run will be sent to your default entity, which is usually your username.
–count The max number of runs for this agent.

2 - wandb artifact

Usage

wandb artifact [OPTIONS] COMMAND [ARGS]...

Summary

Commands for interacting with artifacts

Options

Option Description

Commands

Command Description
cache Commands for interacting with the artifact cache
get Download an artifact from wandb
ls List all artifacts in a wandb project
put Upload an artifact to wandb

2.1 - wandb artifact cache

Usage

wandb artifact cache [OPTIONS] COMMAND [ARGS]...

Summary

Commands for interacting with the artifact cache

Options

Option Description

Commands

Command Description
cleanup Clean up less frequently used files from the artifacts cache

2.1.1 - wandb artifact cache cleanup

Usage

wandb artifact cache cleanup [OPTIONS] TARGET_SIZE

Summary

Clean up less frequently used files from the artifacts cache

Options

Option Description
–remove-temp / –no-remove-temp Remove temp files

2.2 - wandb artifact get

Usage

wandb artifact get [OPTIONS] PATH

Summary

Download an artifact from wandb

Options

Option Description
–root The directory you want to download the artifact to
–type The type of artifact you are downloading

2.3 - wandb artifact ls

Usage

wandb artifact ls [OPTIONS] PATH

Summary

List all artifacts in a wandb project

Options

Option Description
-t, –type The type of artifacts to list

2.4 - wandb artifact put

Usage

wandb artifact put [OPTIONS] PATH

Summary

Upload an artifact to wandb

Options

Option Description
-n, –name The name of the artifact to push: project/artifact_name
-d, –description A description of this artifact
-t, –type The type of the artifact
-a, –alias An alias to apply to this artifact
–id The run you want to upload to.
–resume Resume the last run from your current directory.
–skip_cache Skip caching while uploading artifact files.
–policy [mutable immutable]

3 - wandb beta

Usage

wandb beta [OPTIONS] COMMAND [ARGS]...

Summary

Beta versions of wandb CLI commands. Requires wandb-core.

Options

Option Description

Commands

Command Description
sync Upload a training run to W&B

3.1 - wandb beta sync

Usage

wandb beta sync [OPTIONS] WANDB_DIR

Summary

Upload a training run to W&B

Options

Option Description
–id The run you want to upload to.
-p, –project The project you want to upload to.
-e, –entity The entity to scope to.
–skip-console Skip console logs
–append Append run
-i, –include Glob to include. Can be used multiple times.
-e, –exclude Glob to exclude. Can be used multiple times.
–mark-synced / –no-mark-synced Mark runs as synced
–skip-synced / –no-skip-synced Skip synced runs
–dry-run Perform a dry run without uploading anything.

4 - wandb controller

Usage

wandb controller [OPTIONS] SWEEP_ID

Summary

Run the W&B local sweep controller

Options

Option Description
–verbose Display verbose output

5 - wandb disabled

Usage

wandb disabled [OPTIONS]

Summary

Disable W&B.

Options

Option Description
–service Disable W&B service [default: True]

6 - wandb docker

Usage

wandb docker [OPTIONS] [DOCKER_RUN_ARGS]... [DOCKER_IMAGE]

Summary

Run your code in a docker container.

W&B docker lets you run your code in a docker image ensuring wandb is configured. It adds the WANDB_DOCKER and WANDB_API_KEY environment variables to your container and mounts the current directory in /app by default. You can pass additional args which will be added to docker run before the image name is declared, we’ll choose a default image for you if one isn’t passed:

wandb docker -v /mnt/dataset:/app/data wandb docker gcr.io/kubeflow-
images-public/tensorflow-1.12.0-notebook-cpu:v0.4.0 --jupyter wandb docker
wandb/deepo:keras-gpu --no-tty --cmd "python train.py --epochs=5"

By default, we override the entrypoint to check for the existence of wandb and install it if not present. If you pass the –jupyter flag we will ensure jupyter is installed and start jupyter lab on port 8888. If we detect nvidia-docker on your system we will use the nvidia runtime. If you just want wandb to set environment variable to an existing docker run command, see the wandb docker-run command.

Options

Option Description
–nvidia / –no-nvidia Use the nvidia runtime, defaults to nvidia if nvidia-docker is present
–digest Output the image digest and exit
–jupyter / –no-jupyter Run jupyter lab in the container
–dir Which directory to mount the code in the container
–no-dir Don’t mount the current directory
–shell The shell to start the container with
–port The host port to bind jupyter on
–cmd The command to run in the container
–no-tty Run the command without a tty

7 - wandb docker-run

Usage

wandb docker-run [OPTIONS] [DOCKER_RUN_ARGS]...

Summary

Wrap docker run and adds WANDB_API_KEY and WANDB_DOCKER environment variables.

This will also set the runtime to nvidia if the nvidia-docker executable is present on the system and –runtime wasn’t set.

See docker run --help for more details.

Options

Option Description

8 - wandb enabled

Usage

wandb enabled [OPTIONS]

Summary

Enable W&B.

Options

Option Description
–service Enable W&B service [default: True]

9 - wandb import

Usage

wandb import [OPTIONS] COMMAND [ARGS]...

Summary

Commands for importing data from other systems

Options

Option Description

Commands

Command Description
mlflow Import from MLFlow

9.1 - wandb import mlflow

Usage

wandb import mlflow [OPTIONS]

Summary

Import from MLFlow

Options

Option Description
–mlflow-tracking-uri MLFlow Tracking URI
–target-entity Override default entity to import data into [required]
–target-project Override default project to import data into [required]

10 - wandb init

Usage

wandb init [OPTIONS]

Summary

Configure a directory with Weights & Biases

Options

Option Description
-p, –project The project to use.
-e, –entity The entity to scope the project to.
–reset Reset settings
-m, –mode Can be online, offline or disabled. Defaults to online.

11 - wandb job

Usage

wandb job [OPTIONS] COMMAND [ARGS]...

Summary

Commands for managing and viewing W&B jobs

Options

Option Description

Commands

Command Description
create Create a job from a source, without a wandb run.
describe Describe a launch job.
list List jobs in a project

11.1 - wandb job create

Usage

wandb job create [OPTIONS] {git|code|image} PATH

Summary

Create a job from a source, without a wandb run.

Jobs can be of three types, git, code, or image.

git: A git source, with an entrypoint either in the path or provided explicitly pointing to the main python executable. code: A code path, containing a requirements.txt file. image: A docker image.

Options

Option Description
-p, –project The project you want to list jobs from.
-e, –entity The entity the jobs belong to
-n, –name Name for the job
-d, –description Description for the job
-a, –alias Alias for the job
–entry-point Entrypoint to the script, including an executable and an entrypoint file. Required for code or repo jobs. If –build-context is provided, paths in the entrypoint command will be relative to the build context.
-g, –git-hash Commit reference to use as the source for git jobs
-r, –runtime Python runtime to execute the job
-b, –build-context Path to the build context from the root of the job source code. If provided, this is used as the base path for the Dockerfile and entrypoint.
–base-image Base image to use for the job. Incompatible with image jobs.
–dockerfile Path to the Dockerfile for the job. If –build- context is provided, the Dockerfile path will be relative to the build context.

11.2 - wandb job describe

Usage

wandb job describe [OPTIONS] JOB

Summary

Describe a launch job. Provide the launch job in the form of: entity/project/job-name:alias-or-version

Options

Option Description

11.3 - wandb job list

Usage

wandb job list [OPTIONS]

Summary

List jobs in a project

Options

Option Description
-p, –project The project you want to list jobs from.
-e, –entity The entity the jobs belong to

12 - wandb launch

Usage

wandb launch [OPTIONS]

Summary

Launch or queue a W&B Job. See https://wandb.me/launch

Options

Option Description
-u, –uri (str) Local path or git repo uri to launch. If provided this command will create a job from the specified uri.
-j, –job (str) Name of the job to launch. If passed in, launch does not require a uri.
–entry-point Entry point within project. [default: main]. If the entry point is not found, attempts to run the project file with the specified name as a script, using ‘python’ to run .py files and the default shell (specified by environment variable $SHELL) to run .sh files. If passed in, will override the entrypoint value passed in using a config file.
–build-context (str) Path to the build context within the source code. Defaults to the root of the source code. Compatible only with -u.
–name Name of the run under which to launch the run. If not specified, a random run name will be used to launch run. If passed in, will override the name passed in using a config file.
-e, –entity (str) Name of the target entity which the new run will be sent to. Defaults to using the entity set by local wandb/settings folder. If passed in, will override the entity value passed in using a config file.
-p, –project (str) Name of the target project which the new run will be sent to. Defaults to using the project name given by the source uri or for github runs, the git repo name. If passed in, will override the project value passed in using a config file.
-r, –resource Execution resource to use for run. Supported values: ’local-process’, ’local-container’, ‘kubernetes’, ‘sagemaker’, ‘gcp-vertex’. This is now a required parameter if pushing to a queue with no resource configuration. If passed in, will override the resource value passed in using a config file.
-d, –docker-image Specific docker image you’d like to use. In the form name:tag. If passed in, will override the docker image value passed in using a config file.
–base-image Docker image to run job code in. Incompatible with –docker-image.
-c, –config Path to JSON file (must end in ‘.json’) or JSON string which will be passed as a launch config. Dictation how the launched run will be configured.
-v, –set-var Set template variable values for queues with allow listing enabled, as key-value pairs. Examples: --set-var key1=value1 --set-var key2=value2
-q, –queue Name of run queue to push to. If none, launches single run directly. If supplied without an argument (--queue), defaults to queue default. Otherwise, if you supply a queue by name, the queue must exist under the project and entity supplied.
–async Flag to run the job asynchronously. Defaults to false. Unless --async is set, wandb launch waits for the job to finish. This option is incompatible with --queue. Set asynchronous options on wandb launch-agent when running with an agent.
–resource-args Path to JSON file (must end in ‘.json’) or JSON string which will be passed as resource args to the compute resource. The exact content which should be provided is different for each execution backend. See documentation for layout of this file.
–dockerfile Path to the Dockerfile used to build the job, relative to the job’s root
–priority [critical high

13 - wandb launch-agent

Usage

wandb launch-agent [OPTIONS]

Summary

Run a W&B launch agent.

Options

Option Description
-q, –queue The name of a queue for the agent to watch. Multiple -q flags supported.
-e, –entity The entity to use. Defaults to current logged-in user
-l, –log-file Destination for internal agent logs. Use - for stdout. By default all agents logs will go to debug.log in your wandb/ subdirectory or WANDB_DIR if set.
-j, –max-jobs The maximum number of launch jobs this agent can run in parallel. Defaults to 1. Set to -1 for no upper limit
-c, –config path to the agent config yaml to use
-v, –verbose Display verbose output

14 - wandb launch-sweep

Usage

wandb launch-sweep [OPTIONS] [CONFIG]

Summary

Run a W&B launch sweep (Experimental).

Options

Option Description
-q, –queue The name of a queue to push the sweep to
-p, –project Name of the project which the agent will watch. If passed in, will override the project value passed in using a config file
-e, –entity The entity to use. Defaults to current logged-in user
-r, –resume_id Resume a launch sweep by passing an 8-char sweep id. Queue required
–prior_run ID of an existing run to add to this sweep

15 - wandb login

Usage

wandb login [OPTIONS] [KEY]...

Summary

Login to Weights & Biases

Options

Option Description
–cloud Login to the cloud instead of local
–host Login to a specific instance of W&B
–relogin Force relogin if already logged in.
–anonymously Log in anonymously
–verify Verify login credentials

16 - wandb offline

Usage

wandb offline [OPTIONS]

Summary

Disable W&B sync

Options

Option Description

17 - wandb online

Usage

wandb online [OPTIONS]

Summary

Enable W&B sync

Options

Option Description

18 - wandb pull

Usage

wandb pull [OPTIONS] RUN

Summary

Pull files from Weights & Biases

Options

Option Description
-p, –project The project you want to download.
-e, –entity The entity to scope the listing to.

19 - wandb restore

Usage

wandb restore [OPTIONS] RUN

Summary

Restore code, config and docker state for a run

Options

Option Description
–no-git Don’t restore git state
–branch / –no-branch Whether to create a branch or checkout detached
-p, –project The project you wish to upload to.
-e, –entity The entity to scope the listing to.

20 - wandb scheduler

Usage

wandb scheduler [OPTIONS] SWEEP_ID

Summary

Run a W&B launch sweep scheduler (Experimental)

Options

Option Description

21 - wandb server

Usage

wandb server [OPTIONS] COMMAND [ARGS]...

Summary

Commands for operating a local W&B server

Options

Option Description

Commands

Command Description
start Start a local W&B server
stop Stop a local W&B server

21.1 - wandb server start

Usage

wandb server start [OPTIONS]

Summary

Start a local W&B server

Options

Option Description
-p, –port The host port to bind W&B server on
-e, –env Env vars to pass to wandb/local
–daemon / –no-daemon Run or don’t run in daemon mode

21.2 - wandb server stop

Usage

wandb server stop [OPTIONS]

Summary

Stop a local W&B server

Options

Option Description

22 - wandb status

Usage

wandb status [OPTIONS]

Summary

Show configuration settings

Options

Option Description
–settings / –no-settings Show the current settings

23 - wandb sweep

Usage

wandb sweep [OPTIONS] CONFIG_YAML_OR_SWEEP_ID

Summary

Initialize a hyperparameter sweep. Search for hyperparameters that optimizes a cost function of a machine learning model by testing various combinations.

Options

Option Description
-p, –project The name of the project where W&B runs created from the sweep are sent to. If the project is not specified, the run is sent to a project labeled Uncategorized.
-e, –entity The username or team name where you want to send W&B runs created by the sweep to. Ensure that the entity you specify already exists. If you don’t specify an entity, the run will be sent to your default entity, which is usually your username.
–controller Run local controller
–verbose Display verbose output
–name The name of the sweep. The sweep ID is used if no name is specified.
–program Set sweep program
–update Update pending sweep
–stop Finish a sweep to stop running new runs and let currently running runs finish.
–cancel Cancel a sweep to kill all running runs and stop running new runs.
–pause Pause a sweep to temporarily stop running new runs.
–resume Resume a sweep to continue running new runs.
–prior_run ID of an existing run to add to this sweep

24 - wandb sync

Usage

wandb sync [OPTIONS] [PATH]...

Summary

Upload an offline training directory to W&B

Options

Option Description
–id The run you want to upload to.
-p, –project The project you want to upload to.
-e, –entity The entity to scope to.
–job_type Specifies the type of run for grouping related runs together.
–sync-tensorboard / –no-sync-tensorboard Stream tfevent files to wandb.
–include-globs Comma separated list of globs to include.
–exclude-globs Comma separated list of globs to exclude.
–include-online / –no-include-online Include online runs
–include-offline / –no-include-offline Include offline runs
–include-synced / –no-include-synced Include synced runs
–mark-synced / –no-mark-synced Mark runs as synced
–sync-all Sync all runs
–clean Delete synced runs
–clean-old-hours Delete runs created before this many hours. To be used alongside –clean flag.
–clean-force Clean without confirmation prompt.
–show Number of runs to show
–append Append run
–skip-console Skip console logs

25 - wandb verify

Usage

wandb verify [OPTIONS]

Summary

Verify your local instance

Options

Option Description
–host Test a specific instance of W&B