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

OptionDescription
--versionShow the version and exit.

Commands

CommandDescription
agentRun the W&B agent
artifactCommands for interacting with artifacts
betaBeta versions of wandb CLI commands.
controllerRun the W&B local sweep controller
disabledDisable W&B.
dockerRun your code in a docker container.
docker-runWrap docker run and adds WANDB_API_KEY and WANDB_DOCKER…
enabledEnable W&B.
initConfigure a directory with Weights & Biases
jobCommands for managing and viewing W&B jobs
launchLaunch or queue a W&B Job.
launch-agentRun a W&B launch agent.
launch-sweepRun a W&B launch sweep (Experimental).
loginLogin to Weights & Biases
offlineDisable W&B sync
onlineEnable W&B sync
pullPull files from Weights & Biases
restoreRestore code, config and docker state for a run
schedulerRun a W&B launch sweep scheduler (Experimental)
serverCommands for operating a local W&B server
statusShow configuration settings
sweepInitialize a hyperparameter sweep.
syncUpload an offline training directory to W&B
verifyVerify your local instance

1 - wandb agent

Usage

wandb agent [OPTIONS] SWEEP_ID

Summary

Run the W&B agent

Options

OptionDescription
-p, --projectThe 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, --entityThe 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.
--countThe max number of runs for this agent.

2 - wandb artifact

Usage

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

Summary

Commands for interacting with artifacts

Options

OptionDescription

Commands

CommandDescription
cacheCommands for interacting with the artifact cache
getDownload an artifact from wandb
lsList all artifacts in a wandb project
putUpload 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

OptionDescription

Commands

CommandDescription
cleanupClean 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

OptionDescription
--remove-temp / --no-remove-tempRemove temp files

2.2 - wandb artifact get

Usage

wandb artifact get [OPTIONS] PATH

Summary

Download an artifact from wandb

Options

OptionDescription
--rootThe directory you want to download the artifact to
--typeThe 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

OptionDescription
-t, --typeThe type of artifacts to list

2.4 - wandb artifact put

Usage

wandb artifact put [OPTIONS] PATH

Summary

Upload an artifact to wandb

Options

OptionDescription
-n, --nameThe name of the artifact to push: project/artifact_name
-d, --descriptionA description of this artifact
-t, --typeThe type of the artifact
-a, --aliasAn alias to apply to this artifact
--idThe run you want to upload to.
--resumeResume the last run from your current directory.
--skip_cacheSkip caching while uploading artifact files.
--policy [mutable|immutable]Set the storage policy while uploading artifact files.

3 - wandb beta

Usage

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

Summary

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

Options

OptionDescription

Commands

CommandDescription
syncUpload 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

OptionDescription
--idThe run you want to upload to.
-p, --projectThe project you want to upload to.
-e, --entityThe entity to scope to.
--skip-consoleSkip console logs
--appendAppend run
-i, --includeGlob to include. Can be used multiple times.
-e, --excludeGlob to exclude. Can be used multiple times.
--mark-synced / --no-mark-syncedMark runs as synced
--skip-synced / --no-skip-syncedSkip synced runs
--dry-runPerform a dry run without uploading anything.

4 - wandb controller

Usage

wandb controller [OPTIONS] SWEEP_ID

Summary

Run the W&B local sweep controller

Options

OptionDescription
--verboseDisplay verbose output

5 - wandb disabled

Usage

wandb disabled [OPTIONS]

Summary

Disable W&B.

Options

OptionDescription
--serviceDisable 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:

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

OptionDescription

8 - wandb enabled

Usage

wandb enabled [OPTIONS]

Summary

Enable W&B.

Options

OptionDescription
--serviceEnable W&B service [default: True]

9 - wandb init

Usage

wandb init [OPTIONS]

Summary

Configure a directory with Weights & Biases

Options

OptionDescription
-p, --projectThe project to use.
-e, --entityThe entity to scope the project to.
--resetReset settings
-m, --modeCan be “online”, “offline” or “disabled”. Defaults to online.

10 - wandb job

Usage

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

Summary

Commands for managing and viewing W&B jobs

Options

OptionDescription

Commands

CommandDescription
createCreate a job from a source, without a wandb run.
describeDescribe a launch job.
listList jobs in a project

10.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

OptionDescription
-p, --projectThe project you want to list jobs from.
-e, --entityThe entity the jobs belong to
-n, --nameName for the job
-d, --descriptionDescription for the job
-a, --aliasAlias for the job
--entry-pointEntrypoint 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-hashCommit reference to use as the source for git jobs
-r, --runtimePython runtime to execute the job
-b, --build-contextPath 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-imageBase image to use for the job. Incompatible with image jobs.
--dockerfilePath to the Dockerfile for the job. If –build- context is provided, the Dockerfile path will be relative to the build context.

10.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

OptionDescription

10.3 - wandb job list

Usage

wandb job list [OPTIONS]

Summary

List jobs in a project

Options

OptionDescription
-p, --projectThe project you want to list jobs from.
-e, --entityThe entity the jobs belong to

11 - wandb launch

Usage

wandb launch [OPTIONS]

Summary

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

Options

OptionDescription
-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-pointEntry 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.
--nameName 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, --resourceExecution 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-imageSpecific 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-imageDocker image to run job code in. Incompatible with –docker-image.
-c, --configPath 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-varSet template variable values for queues with allow listing enabled, as key-value pairs e.g. --set-var key1=value1 --set-var key2=value2
-q, --queueName of run queue to push to. If none, launches single run directly. If supplied without an argument (--queue), defaults to queue ‘default’. Else, if name supplied, specified run queue must exist under the project and entity supplied.
--asyncFlag to run the job asynchronously. Defaults to false, i.e. unless –async is set, wandb launch will wait for the job to finish. This option is incompatible with –queue; asynchronous options when running with an agent should be set on wandb launch-agent.
--resource-argsPath 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.
--dockerfilePath to the Dockerfile used to build the job, relative to the job’s root
`–priority [criticalhigh

12 - wandb launch-agent

Usage

wandb launch-agent [OPTIONS]

Summary

Run a W&B launch agent.

Options

OptionDescription
-q, --queueThe name of a queue for the agent to watch. Multiple -q flags supported.
-e, --entityThe entity to use. Defaults to current logged-in user
-l, --log-fileDestination 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-jobsThe maximum number of launch jobs this agent can run in parallel. Defaults to 1. Set to -1 for no upper limit
-c, --configpath to the agent config yaml to use
-v, --verboseDisplay verbose output

13 - wandb launch-sweep

Usage

wandb launch-sweep [OPTIONS] [CONFIG]

Summary

Run a W&B launch sweep (Experimental).

Options

OptionDescription
-q, --queueThe name of a queue to push the sweep to
-p, --projectName of the project which the agent will watch. If passed in, will override the project value passed in using a config file
-e, --entityThe entity to use. Defaults to current logged-in user
-r, --resume_idResume a launch sweep by passing an 8-char sweep id. Queue required
--prior_runID of an existing run to add to this sweep

14 - wandb login

Usage

wandb login [OPTIONS] [KEY]...

Summary

Login to Weights & Biases

Options

OptionDescription
--cloudLogin to the cloud instead of local
--host, --base-urlLogin to a specific instance of W&B
--reloginForce relogin if already logged in.
--anonymouslyLog in anonymously
--verify / --no-verifyVerify login credentials

15 - wandb offline

Usage

wandb offline [OPTIONS]

Summary

Disable W&B sync

Options

OptionDescription

16 - wandb online

Usage

wandb online [OPTIONS]

Summary

Enable W&B sync

Options

OptionDescription

17 - wandb pull

Usage

wandb pull [OPTIONS] RUN

Summary

Pull files from Weights & Biases

Options

OptionDescription
-p, --projectThe project you want to download.
-e, --entityThe entity to scope the listing to.

18 - wandb restore

Usage

wandb restore [OPTIONS] RUN

Summary

Restore code, config and docker state for a run

Options

OptionDescription
--no-gitDon’t restore git state
--branch / --no-branchWhether to create a branch or checkout detached
-p, --projectThe project you wish to upload to.
-e, --entityThe entity to scope the listing to.

19 - wandb scheduler

Usage

wandb scheduler [OPTIONS] SWEEP_ID

Summary

Run a W&B launch sweep scheduler (Experimental)

Options

OptionDescription

20 - wandb server

Usage

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

Summary

Commands for operating a local W&B server

Options

OptionDescription

Commands

CommandDescription
startStart a local W&B server
stopStop a local W&B server

20.1 - wandb server start

Usage

wandb server start [OPTIONS]

Summary

Start a local W&B server

Options

OptionDescription
-p, --portThe host port to bind W&B server on
-e, --envEnv vars to pass to wandb/local
--daemon / --no-daemonRun or don’t run in daemon mode

20.2 - wandb server stop

Usage

wandb server stop [OPTIONS]

Summary

Stop a local W&B server

Options

OptionDescription

21 - wandb status

Usage

wandb status [OPTIONS]

Summary

Show configuration settings

Options

OptionDescription
--settings / --no-settingsShow the current settings

22 - 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

OptionDescription
-p, --projectThe 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, --entityThe 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.
--controllerRun local controller
--verboseDisplay verbose output
--nameThe name of the sweep. The sweep ID is used if no name is specified.
--programSet sweep program
--updateUpdate pending sweep
--stopFinish a sweep to stop running new runs and let currently running runs finish.
--cancelCancel a sweep to kill all running runs and stop running new runs.
--pausePause a sweep to temporarily stop running new runs.
--resumeResume a sweep to continue running new runs.
--prior_runID of an existing run to add to this sweep

23 - wandb sync

Usage

wandb sync [OPTIONS] [PATH]...

Summary

Upload an offline training directory to W&B

Options

OptionDescription
--idThe run you want to upload to.
-p, --projectThe project you want to upload to.
-e, --entityThe entity to scope to.
--job_typeSpecifies the type of run for grouping related runs together.
--sync-tensorboard / --no-sync-tensorboardStream tfevent files to wandb.
--include-globsComma separated list of globs to include.
--exclude-globsComma separated list of globs to exclude.
--include-online / --no-include-onlineInclude online runs
--include-offline / --no-include-offlineInclude offline runs
--include-synced / --no-include-syncedInclude synced runs
--mark-synced / --no-mark-syncedMark runs as synced
--sync-allSync all runs
--cleanDelete synced runs
--clean-old-hoursDelete runs created before this many hours. To be used alongside –clean flag.
--clean-forceClean without confirmation prompt.
--showNumber of runs to show
--appendAppend run
--skip-consoleSkip console logs

24 - wandb verify

Usage

wandb verify [OPTIONS]

Summary

Verify your local instance

Options

OptionDescription
--hostTest a specific instance of W&B