diff --git a/docs.json b/docs.json index 05d3ccb12e..4471a7fcd6 100644 --- a/docs.json +++ b/docs.json @@ -588,13 +588,7 @@ "group": "wandb artifact", "pages": [ "models/ref/cli/wandb-artifact", - { - "group": "artifact cache", - "pages": [ - "models/ref/cli/wandb-artifact/wandb-artifact-cache", - "models/ref/cli/wandb-artifact/wandb-artifact-cache/wandb-artifact-cache-cleanup" - ] - }, + "models/ref/cli/wandb-artifact/wandb-artifact-cache", "models/ref/cli/wandb-artifact/wandb-artifact-get", "models/ref/cli/wandb-artifact/wandb-artifact-ls", "models/ref/cli/wandb-artifact/wandb-artifact-put" @@ -630,13 +624,9 @@ "models/ref/cli/wandb-job/wandb-job-list" ] }, - "models/ref/cli/wandb-local", "models/ref/cli/wandb-login", - "models/ref/cli/wandb-off", "models/ref/cli/wandb-offline", - "models/ref/cli/wandb-on", "models/ref/cli/wandb-online", - "models/ref/cli/wandb-projects", "models/ref/cli/wandb-pull", "models/ref/cli/wandb-restore", { diff --git a/models/ref/cli/wandb-agent.mdx b/models/ref/cli/wandb-agent.mdx index 0fa439b33b..1802755af5 100644 --- a/models/ref/cli/wandb-agent.mdx +++ b/models/ref/cli/wandb-agent.mdx @@ -1,38 +1,77 @@ --- -title: "wandb agent" +title: wandb agent --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-agent.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbAgent from "/snippets/en/_includes/cli/wandb-agent.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Run the W&B agent + ## Usage -```bash -wandb agent SWEEP_ID [OPTIONS] +```shell +wandb agent [OPTIONS] SWEEP_ID ``` +## Description + + +Start a sweep agent. + + Poll the W&B server for hyperparameter configurations from + the sweep and start a run for each configuration. + + The agent exits when the sweep completes, the sweep + is stopped, cancelled, or the `--count` limit is reached. + + Find the sweep ID in: + * The W&B App at `https://wandb.ai/entity/project/sweeps`. Replace + `entity` and `project` with your entity and project names. + * The output of the `wandb sweep` command when you create a new sweep. + + The sweep ID can include the entity and project path + (`entity/project/sweep_id`) or the eight character sweep ID alone. + + ## Examples + + Start an agent for a sweep with a sweep ID of "wbyz9876" + + ```bash + wandb agent wbyz9876 + ``` + + Start an agent with a run limit of 10 runs for the sweep + + ```bash + wandb agent --count 10 wbyz9876 + ``` + + Start an agent for a sweep and save it to a project + called "sweeps-project" that belongs to the "team-awesome" entity + + ```bash + wandb agent -p sweeps-project -e team-awesome wbyz9876 + ``` + + Forward signals to child runs for clean shutdown + + ```bash + wandb agent --forward-signals wbyz9876 + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `SWEEP_ID` | No description available | Yes | +| Name | Default | Type | +|------|---------|------| +| `sweep_id` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--project`, `-p` | 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'. | -| `--entity`, `-e` | 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. | -| `--forward-signals`, `-f` | Forward signals delivered to the agent (e.g. SIGINT/SIGTERM) to its child runs so they can shut down cleanly. (default: False) | +| Flag | Type | Description | +|------|------|-------------| +| `--project, -p` | STR | Set the project to upload runs to. **Default:** None | +| `--entity, -e` | STR | Set the entity to scope the project to. **Default:** None | +| `--count` | INT | Maximum number of runs this agent will execute. Continues until the sweep completes if not set. **Default:** None | +| `--forward-signals, -f` | BOOL Flag | Forward signals (e.g. SIGINT/SIGTERM) to child runs so they can shut down cleanly. **Default:** False | + diff --git a/models/ref/cli/wandb-artifact.mdx b/models/ref/cli/wandb-artifact.mdx index 9807af6c58..934d02e286 100644 --- a/models/ref/cli/wandb-artifact.mdx +++ b/models/ref/cli/wandb-artifact.mdx @@ -1,20 +1,27 @@ --- -title: "wandb artifact" +title: wandb artifact --- -Commands for interacting with artifacts +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb artifact COMMAND [ARGS]... +```shell +wandb artifact [OPTIONS] COMMAND [ARGS]... ``` -## Commands -| Command | Description | -| :--- | :--- | -| [cache](/models/ref/cli/wandb-artifact/wandb-artifact-cache) | Commands for interacting with the artifact cache | -| [get](/models/ref/cli/wandb-artifact/wandb-artifact-get) | Download an artifact from wandb | -| [ls](/models/ref/cli/wandb-artifact/wandb-artifact-ls) | List all artifacts in a wandb project | -| [put](/models/ref/cli/wandb-artifact/wandb-artifact-put) | Upload an artifact to wandb | +## Description + + +Upload, download, and manage W&B artifacts. + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-artifact/wandb-artifact-cache.mdx b/models/ref/cli/wandb-artifact/wandb-artifact-cache.mdx index cb1389d298..2fac4c2006 100644 --- a/models/ref/cli/wandb-artifact/wandb-artifact-cache.mdx +++ b/models/ref/cli/wandb-artifact/wandb-artifact-cache.mdx @@ -1,17 +1,25 @@ --- -title: "wandb artifact cache" +title: wandb artifact-cache --- -Commands for interacting with the artifact cache + +Manage the local artifact cache. + + Cache downloaded artifact files locally to avoid redundant downloads. + + Use subcommands to inspect and reclaim disk space used by the cache. + ## Usage -```bash -wandb artifact cache COMMAND [ARGS]... +```shell +wandb artifact cache [OPTIONS] COMMAND [ARGS]... ``` -## Commands -| Command | Description | -| :--- | :--- | -| [cleanup](/models/ref/cli/wandb-artifact/wandb-artifact-cache/wandb-artifact-cache-cleanup) | Clean up less frequently used files from the artifacts cache | +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-artifact/wandb-artifact-cache/wandb-artifact-cache-cleanup.mdx b/models/ref/cli/wandb-artifact/wandb-artifact-cache/wandb-artifact-cache-cleanup.mdx deleted file mode 100644 index de59f51d58..0000000000 --- a/models/ref/cli/wandb-artifact/wandb-artifact-cache/wandb-artifact-cache-cleanup.mdx +++ /dev/null @@ -1,35 +0,0 @@ ---- -title: "wandb artifact cache cleanup" ---- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-artifact-cache-cleanup.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: - -import WandbArtifactCacheCleanup from "/snippets/en/_includes/cli/wandb-artifact-cache-cleanup.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} - -Clean up less frequently used files from the artifacts cache - -## Usage - -```bash -wandb artifact cache cleanup TARGET_SIZE [OPTIONS] -``` - -## Arguments - -| Argument | Description | Required | -| :--- | :--- | :--- | -| `TARGET_SIZE` | No description available | Yes | - -## Options - -| Option | Description | -| :--- | :--- | -| `--remove-temp` | Remove temp files (default: False) | diff --git a/models/ref/cli/wandb-artifact/wandb-artifact-get.mdx b/models/ref/cli/wandb-artifact/wandb-artifact-get.mdx index 9f30fc64ab..7da243f32e 100644 --- a/models/ref/cli/wandb-artifact/wandb-artifact-get.mdx +++ b/models/ref/cli/wandb-artifact/wandb-artifact-get.mdx @@ -1,36 +1,42 @@ --- -title: "wandb artifact get" +title: wandb artifact-get --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-artifact-get.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbArtifactGet from "/snippets/en/_includes/cli/wandb-artifact-get.mdx"; - +Download an artifact from W&B by its path. - The snippet will be auto-detected on the next regeneration. -*/} + The `PATH` format is `entity/project/artifact_name:version`. If + the version is omitted, use the `latest` alias. -Download an artifact from wandb + ## Examples + + Download the latest version of an artifact called "processed-training-set" + from the "foobar-project" project under the "team-awesome" entity. + + ```bash + wandb artifact get team-awesome/foobar-project/processed-training-set:latest + ``` + + Download a specific version (v2) of the "processed-training-set" artifact + to a local directory (./data). + + ```bash + wandb artifact get --root ./data team-awesome/foobar-project/processed-training-set:v2 + ``` + ## Usage -```bash -wandb artifact get PATH [OPTIONS] +```shell +wandb artifact get [OPTIONS] PATH ``` -## Arguments - -| Argument | Description | Required | -| :--- | :--- | :--- | -| `PATH` | No description available | Yes | ## Options -| Option | Description | -| :--- | :--- | -| `--root` | The directory you want to download the artifact to | -| `--type` | The type of artifact you are downloading | +| Flag | Type | Description | +|------|------|-------------| +| `--root` | STRING | Directory to download the artifact to. Uses the default artifact cache if not set. **Default:** None | +| `--type` | STRING | Expected artifact type. Fails if the artifact does not match. **Default:** None | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-artifact/wandb-artifact-ls.mdx b/models/ref/cli/wandb-artifact/wandb-artifact-ls.mdx index 8999ca23b8..80d34a1bfe 100644 --- a/models/ref/cli/wandb-artifact/wandb-artifact-ls.mdx +++ b/models/ref/cli/wandb-artifact/wandb-artifact-ls.mdx @@ -1,35 +1,42 @@ --- -title: "wandb artifact ls" +title: wandb artifact-ls --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-artifact-ls.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbArtifactLs from "/snippets/en/_includes/cli/wandb-artifact-ls.mdx"; - +List all artifacts in a W&B project. - The snippet will be auto-detected on the next regeneration. -*/} + Display the latest version of each artifact collection in a + project. Show the type, last updated time, size, and name. -List all artifacts in a wandb project + The `PATH` consists of the entity and project (`entity/project`) to + list artifacts from. + + ## Examples + + List all artifacts in a project called "foobar-project" under the "team-awesome" entity + + ```bash + wandb artifact ls team-awesome/foobar-project + ``` + + List only artifacts of type "model" in the same project + + ```bash + wandb artifact ls --type model team-awesome/foobar-project + ``` + ## Usage -```bash -wandb artifact ls PATH [OPTIONS] +```shell +wandb artifact ls [OPTIONS] PATH ``` -## Arguments - -| Argument | Description | Required | -| :--- | :--- | :--- | -| `PATH` | No description available | Yes | ## Options -| Option | Description | -| :--- | :--- | -| `--type`, `-t` | The type of artifacts to list | +| Flag | Type | Description | +|------|------|-------------| +| `-t, --type` | STRING | Filter artifacts by type. **Default:** None | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-artifact/wandb-artifact-put.mdx b/models/ref/cli/wandb-artifact/wandb-artifact-put.mdx index 2f06cd71e7..0c7544d4d2 100644 --- a/models/ref/cli/wandb-artifact/wandb-artifact-put.mdx +++ b/models/ref/cli/wandb-artifact/wandb-artifact-put.mdx @@ -1,42 +1,70 @@ --- -title: "wandb artifact put" +title: wandb artifact-put --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-artifact-put.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbArtifactPut from "/snippets/en/_includes/cli/wandb-artifact-put.mdx"; - +Upload an artifact to W&B. - The snippet will be auto-detected on the next regeneration. -*/} + Upload a file, directory, or URL reference as a versioned artifact. -Upload an artifact to wandb + The `PATH` can be a local file, a local directory, or a URL + (containing `://`) to log as a reference artifact. + + If `--name` is not specified, the artifact name defaults to the + basename of the path. If the project cannot be parsed from the + name, you are prompted to enter one. + + ## Examples + + Upload all files in a local directory ./data/training as a dataset artifact in W&B. + + ```bash + wandb artifact put --type dataset ./data/training + ``` + + Upload "model.pt" to the "foobar" project and assign "trained-model" as the artifact name. + + ```bash + wandb artifact put --name foobar/trained-model --type model ./model.pt + ``` + + Tag the artifact with both "latest" and "v2.0" so it can be referenced by either alias. + + ```bash + wandb artifact put --alias latest --alias v2.0 --type model ./model.pt + ``` + + Record an Amazon S3 path as a reference without downloading or re-uploading the data. + + ```bash + wandb artifact put --type dataset s3://my-bucket/datasets/training + ``` + + Attach a human-readable description to a dataset artifact for documentation. + + ```bash + wandb artifact put --type dataset --description "Training data, Jan 2025" ./data/training + ``` + ## Usage -```bash -wandb artifact put PATH [OPTIONS] +```shell +wandb artifact put [OPTIONS] PATH ``` -## Arguments - -| Argument | Description | Required | -| :--- | :--- | :--- | -| `PATH` | No description available | Yes | ## Options -| Option | Description | -| :--- | :--- | -| `--name`, `-n` | The name of the artifact to push: project/artifact_name | -| `--description`, `-d` | A description of this artifact | -| `--type`, `-t` | The type of the artifact (default: dataset) | -| `--alias`, `-a` | An alias to apply to this artifact (default: ['latest']) | -| `--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. (default: False) | -| `--policy` | Set the storage policy while uploading artifact files. (default: mutable) | +| Flag | Type | Description | +|------|------|-------------| +| `-n, --name` | STRING | Artifact name in project/artifact_name format. Defaults to the basename of the path. **Default:** None | +| `-d, --description` | STRING | A description of this artifact. **Default:** None | +| `-t, --type` | STRING | The type of the artifact. Defaults to 'dataset'. **Default:** dataset | +| `-a, --alias` | STRING | An alias to apply to this artifact. Can be specified multiple times. Defaults to 'latest'. **Default:** ['latest'] | +| `--id` | STRING | Upload to an existing run with this ID. **Default:** None | +| `--resume` | BOOL | Resume the last run from your current directory. **Default:** None | +| `--skip_cache` | BOOL | Skip caching while uploading artifact files. **Default:** False | +| `--policy` | Choice(['mutable', 'immutable']) | Set the storage policy for artifact files. Either 'mutable' (default) or 'immutable'. **Default:** mutable | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-beta.mdx b/models/ref/cli/wandb-beta.mdx index 1fce4f9b66..bc0d61cdf9 100644 --- a/models/ref/cli/wandb-beta.mdx +++ b/models/ref/cli/wandb-beta.mdx @@ -1,20 +1,30 @@ --- -title: "wandb beta" +title: wandb beta --- -Beta versions of wandb CLI commands. +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; -These commands may change or even completely break in any release of wandb. + ## Usage -```bash -wandb beta COMMAND [ARGS]... +```shell +wandb beta [OPTIONS] COMMAND [ARGS]... ``` -## Commands -| Command | Description | -| :--- | :--- | -| [leet](/models/ref/cli/wandb-beta/wandb-beta-leet) | W&B LEET: the Lightweight Experiment Exploration Tool. | -| [sync](/models/ref/cli/wandb-beta/wandb-beta-sync) | Upload .wandb files specified by PATHS. | +## Description + + +Beta versions of wandb CLI commands. + + These commands may change or even completely break in any release of wandb. + + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-beta/wandb-beta-leet.mdx b/models/ref/cli/wandb-beta/wandb-beta-leet.mdx index cee6dc55e7..7080685c24 100644 --- a/models/ref/cli/wandb-beta/wandb-beta-leet.mdx +++ b/models/ref/cli/wandb-beta/wandb-beta-leet.mdx @@ -1,20 +1,34 @@ --- -title: "wandb beta leet" +title: wandb beta-leet --- -import WandbBetaLeet from "/snippets/en/_includes/cli/wandb-beta-leet.mdx"; - +Launch W&B LEET: the Lightweight Experiment Exploration Tool. + + LEET is a terminal UI for viewing a W&B run specified by an optional PATH. + + PATH can include a .wandb file or a run directory containing a .wandb file. + If PATH is not provided, the command will look for the latest run. + ## Usage -```bash -wandb beta leet COMMAND [ARGS]... +```shell +wandb beta leet [OPTIONS] [PATH] ``` ## Commands -| Command | Description | -| :--- | :--- | -| [config](/models/ref/cli/wandb-beta/wandb-beta-leet/wandb-beta-leet-config) | Edit LEET configuration. | -| [run](/models/ref/cli/wandb-beta/wandb-beta-leet/wandb-beta-leet-run) | Launch the LEET TUI. | +| Name | Default | Type | +|------|---------|------| +| `path` | None | | + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--pprof` | STRING | Run with pprof enabled at a specified address, e.g. --pprof=127.0.0.1:6060. + +If set, serves /debug/pprof/* on this address, e.g. 127.0.0.1:6060/debug/pprof. **Default:** | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-beta/wandb-beta-sync.mdx b/models/ref/cli/wandb-beta/wandb-beta-sync.mdx index 13f73f3ee7..36b98d2e9c 100644 --- a/models/ref/cli/wandb-beta/wandb-beta-sync.mdx +++ b/models/ref/cli/wandb-beta/wandb-beta-sync.mdx @@ -1,66 +1,67 @@ --- -title: "wandb beta sync" +title: wandb beta-sync --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-beta-sync.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbBetaSync from "/snippets/en/_includes/cli/wandb-beta-sync.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} Upload .wandb files specified by PATHS. -This is a beta re-implementation of `wandb sync`. It is not feature complete, not guaranteed to work, and may change in backward-incompatible ways in any release of wandb. + This is a beta re-implementation of `wandb sync`. + It is not feature complete, not guaranteed to work, and may change + in backward-incompatible ways in any release of wandb. -PATHS can include .wandb files, run directories containing .wandb files, and "wandb" directories containing run directories. + PATHS can include .wandb files, run directories containing .wandb files, + and "wandb" directories containing run directories. -For example, to sync all runs in a directory: + For example, to sync all runs in a directory: -```bash -wandb beta sync ./wandb -``` + wandb beta sync ./wandb -To sync a specific run: + To sync a specific run: -```bash -wandb beta sync ./wandb/run-20250813_124246-n67z9ude -``` + wandb beta sync ./wandb/run-20250813_124246-n67z9ude -Or equivalently: + Or equivalently: -```bash -wandb beta sync ./wandb/run-20250813_124246-n67z9ude/run-n67z9ude.wandb -``` + wandb beta sync ./wandb/run-20250813_124246-n67z9ude/run-n67z9ude.wandb + ## Usage -```bash -wandb beta sync [PATHS] [OPTIONS] +```shell +wandb beta sync [OPTIONS] [PATHS]... ``` ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `PATHS` | No description available | No | +| Name | Default | Type | +|------|---------|------| +| `paths` | None | | ## Options -| Option | Description | -| :--- | :--- | -| `--live` | Sync a run while it's still being logged. This may hang if the process generating the run crashes uncleanly. (default: False) | -| `-e`, `--entity` | An entity override to use for all runs being synced. (default: ) | -| `-p`, `--project` | A project override to use for all runs being synced. (default: ) | -| `--id` | A run ID override to use for all runs being synced. If setting this and syncing multiple files (with the same entity and project), the files will be synced in order of start time. This is intended to work with syncing multiple resumed fragments of the same run. (default: ) | -| `--job-type` | A job type override for all runs being synced. (default: ) | -| `--replace-tags` | Rename tags using the format 'old1=new1,old2=new2'. (default: ) | -| `--skip-synced` | Skip runs that have already been synced with this command. (default: True) | -| `--dry-run` | Print what would happen without uploading anything. (default: False) | -| `-v`, `--verbose` | Print more information. (default: False) | -| `-n` | Max number of runs to sync at a time. When syncing multiple files that are part of the same run, the files are synced sequentially in order of start time regardless of this setting. This happens for resumed runs or when using the --id parameter. (default: 5) | +| Flag | Type | Description | +|------|------|-------------| +| `--live` | BOOL | Sync a run while it's still being logged. + +This may hang if the process generating the run crashes uncleanly. **Default:** False | +| `-e, --entity` | STRING | An entity override to use for all runs being synced. **Default:** | +| `-p, --project` | STRING | A project override to use for all runs being synced. **Default:** | +| `--id` | STRING | A run ID override to use for all runs being synced. + +If setting this and syncing multiple files (with the same entity +and project), the files will be synced in order of start time. +This is intended to work with syncing multiple resumed fragments +of the same run. **Default:** | +| `--job-type` | STRING | A job type override for all runs being synced. **Default:** | +| `--replace-tags` | STRING | Rename tags using the format 'old1=new1,old2=new2'. **Default:** | +| `--skip-synced` | BOOL | Skip runs that have already been synced with this command. **Default:** True | +| `--dry-run` | BOOL | Print what would happen without uploading anything. **Default:** False | +| `-v, --verbose` | BOOL | Print more information. **Default:** False | +| `-n` | INT | Max number of runs to sync at a time. + +When syncing multiple files that are part of the same run, +the files are synced sequentially in order of start time +regardless of this setting. This happens for resumed runs +or when using the --id parameter. **Default:** 5 | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-cache-cleanup.mdx b/models/ref/cli/wandb-cache-cleanup.mdx new file mode 100644 index 0000000000..8a5d32b2db --- /dev/null +++ b/models/ref/cli/wandb-cache-cleanup.mdx @@ -0,0 +1,40 @@ +--- +title: wandb cache-cleanup +--- + + +Reduce the local artifact cache size. + + Remove less frequently used files until the cache is at or below + the `TARGET_SIZE`. `TARGET_SIZE` accepts human-readable formats (for example, + 10GB or 500MB). + + ## Examples + + Reduce the artifact cache to 10 GB + + ```bash + wandb artifact cache cleanup 10GB + ``` + + Remove temporary files and reduce the artifact cache to 5 GB + + ```bash + wandb artifact cache cleanup --remove-temp 5GB + ``` + + +## Usage + +```shell +wandb artifact cache cleanup [OPTIONS] TARGET_SIZE +``` + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--remove-temp` | BOOL | Also remove temporary files from the cache. **Default:** False | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-controller.mdx b/models/ref/cli/wandb-controller.mdx index 640cbb1bd8..de5ced8c32 100644 --- a/models/ref/cli/wandb-controller.mdx +++ b/models/ref/cli/wandb-controller.mdx @@ -1,35 +1,55 @@ --- -title: "wandb controller" +title: wandb controller --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-controller.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbController from "/snippets/en/_includes/cli/wandb-controller.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Run the W&B local sweep controller + ## Usage -```bash -wandb controller SWEEP_ID [OPTIONS] +```shell +wandb controller [OPTIONS] SWEEP_ID ``` +## Description + + +Start a local sweep controller for a W&B hyperparameter sweep. + + Start a local process that orchestrates the specified sweep. Read the + sweep configuration from W&B, select hyperparameter combinations based + on the configured search strategy (grid, random, Bayesian, and so on), + and dispatch runs to sweep agents. + + By default, W&B runs sweep controllers on its managed infrastructure. + Use this command to run the controller locally instead. For example, you + can use this command to debug behavior or operate in environments with + limited connectivity. + + ``sweep_id`` is printed by `wandb sweep` when you create a sweep. It + consists of a unique identifier for the sweep and may include the + entity and project path (`entity/project/sweep_id`). + + ## Examples + + Start a local sweep controller for a sweep with sweep ID "wbyz9876" + + ```bash + wandb controller wbyz9876 + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `SWEEP_ID` | No description available | Yes | +| Name | Default | Type | +|------|---------|------| +| `sweep_id` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--verbose` | Display verbose output (default: False) | +| Flag | Type | Description | +|------|------|-------------| +| `--verbose` | BOOL Flag | Display verbose output from controller. **Default:** False | + diff --git a/models/ref/cli/wandb-disabled.mdx b/models/ref/cli/wandb-disabled.mdx index 96c6256a5c..bf7f8c2b4b 100644 --- a/models/ref/cli/wandb-disabled.mdx +++ b/models/ref/cli/wandb-disabled.mdx @@ -1,29 +1,52 @@ --- -title: "wandb disabled" +title: wandb disabled --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-disabled.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbDisabled from "/snippets/en/_includes/cli/wandb-disabled.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Disable W&B. + ## Usage -```bash +```shell wandb disabled [OPTIONS] ``` + +## Description + + +Completely disable W&B. + + Set the mode to `disable` to prevent all W&B functionality. Do not log + or sync data while disabled. + + Use `wandb enable` to restore W&B functionality. + + Use `wandb offline` to stop cloud syncing while continuning to log data + locally. + + ## Examples + + Turn off W&B so that the train.py script executes without logging or + syncing data to W&B. + + ```bash + wandb disabled + python train.py # Does not log or sync data to W&B + ``` + + Restore W&B functionality when ready to log and sync again + + ```bash + wandb enabled + ``` + + + ## Options -| Option | Description | -| :--- | :--- | -| `--service` | Disable W&B service (default: True) | +| Flag | Type | Description | +|------|------|-------------| +| `--service` | BOOL Flag | No effect. Accepted for backwards compatibility. **Default:** True | + diff --git a/models/ref/cli/wandb-docker-run.mdx b/models/ref/cli/wandb-docker-run.mdx index dbcc005b68..22b68aa5fb 100644 --- a/models/ref/cli/wandb-docker-run.mdx +++ b/models/ref/cli/wandb-docker-run.mdx @@ -1,18 +1,53 @@ --- -title: "wandb docker-run" +title: wandb docker-run --- -import WandbDockerRun from "/snippets/en/_includes/cli/wandb-docker-run.mdx"; - +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb docker-run [DOCKER_RUN_ARGS] +```shell +wandb docker-run [OPTIONS] [DOCKER_RUN_ARGS]... ``` +## Description + + +Wrap `docker run` and inject W&B environment variables automatically. + + Pass all arguments through to ``docker run`` while injecting: + + - ``WANDB_API_KEY`` — Use the current API key so the container can + authenticate with W&B without manual configuration. + - ``WANDB_DOCKER`` — Record the resolved image ID so W&B can track + which Docker image produced the run. + + If ``nvidia-docker`` is detected on the host and ``--runtime`` is not + already set, add ``--runtime nvidia`` to the command to enable GPU support + by default. + + ## Examples + + Run `python train.py` inside the "my-image" container. W&B automatically + injects your API key and the resolved image ID. + + ``` + wandb docker-run my-image python train.py + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `DOCKER_RUN_ARGS` | No description available | No | +| Name | Default | Type | +|------|---------|------| +| `docker_run_args` | None | STR | + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-docker.mdx b/models/ref/cli/wandb-docker.mdx index 30798f2cad..6667529d35 100644 --- a/models/ref/cli/wandb-docker.mdx +++ b/models/ref/cli/wandb-docker.mdx @@ -1,33 +1,66 @@ --- -title: "wandb docker" +title: wandb docker --- -import WandbDocker from "/snippets/en/_includes/cli/wandb-docker.mdx"; - +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb docker [DOCKER_RUN_ARGS] [DOCKER_IMAGE] [OPTIONS] +```shell +wandb docker [OPTIONS] [DOCKER_RUN_ARGS]... [DOCKER_IMAGE] ``` +## Description + + +Run your code in a docker container. + + Run your program inside a Docker image with W&B configured. Set the + ``WANDB_DOCKER`` and ``WANDB_API_KEY`` environment variables in the + container and mount the current working directory at ``/app`` by + default. + + Pass additional arguments to insert them into ``docker run`` before the + image name. If you do not specify an image, select a default image + automatically. + + ```sh + 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" + ``` + + Override the container entrypoint by default to ensure ``wandb`` is + installed. If you pass ``--jupyter``, ensure Jupyter is installed and + start JupyterLab on port 8888. + + If NVIDIA Docker is available, use the NVIDIA runtime automatically. + + To set W&B environment variables for an existing ``docker run`` + command without modifying the entrypoint, use ``wandb docker-run``. + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `DOCKER_RUN_ARGS` | No description available | No | -| `DOCKER_IMAGE` | No description available | No | +| Name | Default | Type | +|------|---------|------| +| `docker_run_args` | None | STR | +| `docker_image` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--nvidia` | Use the nvidia runtime, defaults to nvidia if nvidia-docker is present (default: False) | -| `--digest` | Output the image digest and exit (default: False) | -| `--jupyter` | Run jupyter lab in the container (default: False) | -| `--dir` | Which directory to mount the code in the container (default: /app) | -| `--no-dir` | Don't mount the current directory (default: False) | -| `--shell` | The shell to start the container with (default: /bin/bash) | -| `--port` | The host port to bind jupyter on (default: 8888) | -| `--cmd` | The command to run in the container | -| `--no-tty` | Run the command without a tty (default: False) | +| Flag | Type | Description | +|------|------|-------------| +| `--nvidia / --no-nvidia` | BOOL Flag | Use the nvidia runtime, defaults to nvidia if nvidia-docker is present **Default:** False | +| `--digest` | BOOL Flag | Output the image digest and exit **Default:** False | +| `--jupyter / --no-jupyter` | BOOL Flag | Run jupyter lab in the container **Default:** False | +| `--dir` | STR | Which directory to mount the code in the container **Default:** /app | +| `--no-dir` | BOOL Flag | Don't mount the current directory **Default:** False | +| `--shell` | STR | The shell to start the container with **Default:** /bin/bash | +| `--port` | STR | The host port to bind jupyter on **Default:** 8888 | +| `--cmd` | STR | The command to run in the container **Default:** None | +| `--no-tty` | BOOL Flag | Run the command without a tty **Default:** False | + diff --git a/models/ref/cli/wandb-enabled.mdx b/models/ref/cli/wandb-enabled.mdx index 68239e82b8..dbcee01001 100644 --- a/models/ref/cli/wandb-enabled.mdx +++ b/models/ref/cli/wandb-enabled.mdx @@ -1,29 +1,47 @@ --- -title: "wandb enabled" +title: wandb enabled --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-enabled.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbEnabled from "/snippets/en/_includes/cli/wandb-enabled.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Enable W&B. + ## Usage -```bash +```shell wandb enabled [OPTIONS] ``` + +## Description + + +Re-enable W&B after it was deactivated. + + Set the mode to `online` to restore full W&B functionality, + including cloud syncing and artifact storage. + + Undos a previous call to `wandb disabled`. Do not + upload data logged while W&B was set to `disabled`, but allow + new data to be logged and synced. + + To switch between online and offline modes without fully deactivating W&B, + use ``wandb online`` or ``wandb offline`` instead. + + ## Examples + + Restore W&B functionality after deactivating it with `wandb disabled` + + ```bash + wandb enabled + python train.py # Log and sync data to W&B + ``` + + + ## Options -| Option | Description | -| :--- | :--- | -| `--service` | Enable W&B service (default: True) | +| Flag | Type | Description | +|------|------|-------------| +| `--service` | BOOL Flag | No effect. Accepted for backwards compatibility. **Default:** True | + diff --git a/models/ref/cli/wandb-init.mdx b/models/ref/cli/wandb-init.mdx index 576a90dc46..12bcee2c22 100644 --- a/models/ref/cli/wandb-init.mdx +++ b/models/ref/cli/wandb-init.mdx @@ -1,32 +1,62 @@ --- -title: "wandb init" +title: wandb init --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-init.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbInit from "/snippets/en/_includes/cli/wandb-init.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Configure a directory with Weights & Biases + ## Usage -```bash +```shell wandb init [OPTIONS] ``` + +## Description + + +Initialize or update W&B configuration for the current directory. + + Set a project and entity, create local W&B settings, and + prepare the directory for experiment tracking. + + ## Examples + + Set up W&B for the current directory with guided prompts for team and + project selection. + + ```bash + wandb init + ``` + + Set the default project to "foobar-project" and the default entity to + "team-awesome" without prompts. + + ```bash + wandb init --project foobar-project --entity team-awesome + ``` + + Set the W&B mode to offline + + ```bash + wandb init --mode offline + ``` + + Reset existing W&B configuration for the current directory + + ```bash + wandb init --reset + ``` + + + ## Options -| Option | Description | -| :--- | :--- | -| `--project`, `-p` | The project to use. | -| `--entity`, `-e` | The entity to scope the project to. | -| `--reset` | Reset settings (default: False) | -| `--mode`, `-m` | Can be "online", "offline" or "disabled". Defaults to online. | +| Flag | Type | Description | +|------|------|-------------| +| `--project, -p` | STR | Set the project to upload runs to. **Default:** None | +| `--entity, -e` | STR | Set the entity to scope the project to. **Default:** None | +| `--reset` | BOOL Flag | Reset existing W&B configuration for the directory. **Default:** False | +| `--mode, -m` | STR | Set the W&B mode. One of 'online', 'offline', or 'disabled'. **Default:** None | + diff --git a/models/ref/cli/wandb-job.mdx b/models/ref/cli/wandb-job.mdx index edfa6c9199..29d54c5716 100644 --- a/models/ref/cli/wandb-job.mdx +++ b/models/ref/cli/wandb-job.mdx @@ -1,19 +1,27 @@ --- -title: "wandb job" +title: wandb job --- -Commands for managing and viewing W&B jobs +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb job COMMAND [ARGS]... +```shell +wandb job [OPTIONS] COMMAND [ARGS]... ``` -## Commands -| Command | Description | -| :--- | :--- | -| [create](/models/ref/cli/wandb-job/wandb-job-create) | Create a job from a source, without a wandb run. | -| [describe](/models/ref/cli/wandb-job/wandb-job-describe) | Describe a launch job. | -| [list](/models/ref/cli/wandb-job/wandb-job-list) | List jobs in a project | +## Description + + +Commands for managing and viewing W&B jobs + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-job/wandb-job-create.mdx b/models/ref/cli/wandb-job/wandb-job-create.mdx index 0375858d6d..41d6f15ac7 100644 --- a/models/ref/cli/wandb-job/wandb-job-create.mdx +++ b/models/ref/cli/wandb-job/wandb-job-create.mdx @@ -1,50 +1,40 @@ --- -title: "wandb job create" +title: wandb job-create --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-job-create.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbJobCreate from "/snippets/en/_includes/cli/wandb-job-create.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} Create a job from a source, without a wandb run. -Jobs can be of three types, git, code, or image. + 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. + 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. + ## Usage -```bash -wandb job create JOB_TYPE PATH [OPTIONS] +```shell +wandb job create [OPTIONS] {git|code|image} PATH ``` -## Arguments - -| Argument | Description | Required | -| :--- | :--- | :--- | -| `JOB_TYPE` | No description available | Yes | -| `PATH` | No description available | Yes | ## Options -| Option | Description | -| :--- | :--- | -| `--project`, `-p` | The project you want to list jobs from. | -| `--entity`, `-e` | The entity the jobs belong to | -| `--name`, `-n` | Name for the job | -| `--description`, `-d` | Description for the job | -| `--alias`, `-a` | Alias for the job | -| `--entry-point`, `-E` | 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. | -| `--git-hash`, `-g` | Commit reference to use as the source for git jobs | -| `--runtime`, `-r` | Python runtime to execute the job | -| `--build-context`, `-b` | 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`, `-B` | Base image to use for the job. Incompatible with image jobs. | -| `--dockerfile`, `-D` | Path to the Dockerfile for the job. If --build-context is provided, the Dockerfile path will be relative to the build context. | +| Flag | Type | Description | +|------|------|-------------| +| `-p, --project` | STRING | The project you want to list jobs from. **Default:** None | +| `-e, --entity` | STRING | The entity the jobs belong to **Default:** None | +| `-n, --name` | STRING | Name for the job **Default:** None | +| `-d, --description` | STRING | Description for the job **Default:** None | +| `-a, --alias` | STRING | Alias for the job **Default:** () | +| `-E, --entry-point` | STRING | 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. **Default:** None | +| `-g, --git-hash` | STRING | Commit reference to use as the source for git jobs **Default:** None | +| `-r, --runtime` | STRING | Python runtime to execute the job **Default:** None | +| `-b, --build-context` | STRING | 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. **Default:** None | +| `-B, --base-image` | STRING | Base image to use for the job. Incompatible with image jobs. **Default:** None | +| `-D, --dockerfile` | STRING | Path to the Dockerfile for the job. If --build-context is provided, the Dockerfile path will be relative to the build context. **Default:** None | +| `-s, --service` | STRING | Service configurations in format serviceName=policy. Valid policies: always, never **Default:** None | +| `--schema` | STRING | Path to the schema file for the job. **Default:** None | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-job/wandb-job-describe.mdx b/models/ref/cli/wandb-job/wandb-job-describe.mdx index 0cb1a0b078..cdefc26fa6 100644 --- a/models/ref/cli/wandb-job/wandb-job-describe.mdx +++ b/models/ref/cli/wandb-job/wandb-job-describe.mdx @@ -1,29 +1,20 @@ --- -title: "wandb job describe" +title: wandb job-describe --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-job-describe.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbJobDescribe from "/snippets/en/_includes/cli/wandb-job-describe.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} Describe a launch job. Provide the launch job in the form of: entity/project/job-name:alias-or-version ## Usage -```bash -wandb job describe JOB +```shell +wandb job describe [OPTIONS] JOB ``` -## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `JOB` | No description available | Yes | +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-job/wandb-job-list.mdx b/models/ref/cli/wandb-job/wandb-job-list.mdx index b49c1dc2bc..1fe6b97c1b 100644 --- a/models/ref/cli/wandb-job/wandb-job-list.mdx +++ b/models/ref/cli/wandb-job/wandb-job-list.mdx @@ -1,30 +1,22 @@ --- -title: "wandb job list" +title: wandb job-list --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-job-list.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbJobList from "/snippets/en/_includes/cli/wandb-job-list.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} List jobs in a project ## Usage -```bash +```shell wandb job list [OPTIONS] ``` + ## Options -| Option | Description | -| :--- | :--- | -| `--project`, `-p` | The project you want to list jobs from. | -| `--entity`, `-e` | The entity the jobs belong to (default: models) | +| Flag | Type | Description | +|------|------|-------------| +| `-p, --project` | STRING | The project you want to list jobs from. **Default:** None | +| `-e, --entity` | STRING | The entity the jobs belong to **Default:** models | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-launch-agent.mdx b/models/ref/cli/wandb-launch-agent.mdx index 4a2e4b512d..dfd6f5a020 100644 --- a/models/ref/cli/wandb-launch-agent.mdx +++ b/models/ref/cli/wandb-launch-agent.mdx @@ -1,34 +1,33 @@ --- -title: "wandb launch-agent" +title: wandb launch-agent --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-launch-agent.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbLaunchAgent from "/snippets/en/_includes/cli/wandb-launch-agent.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Run a W&B launch agent. + ## Usage -```bash +```shell wandb launch-agent [OPTIONS] ``` + +## Description + + +Run a W&B launch agent. + + ## Options -| Option | Description | -| :--- | :--- | -| `--queue`, `-q` | The name of a queue for the agent to watch. Multiple -q flags supported. | -| `--entity`, `-e` | The entity to use. Defaults to current logged-in user | -| `--log-file`, `-l` | 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. | -| `--max-jobs`, `-j` | The maximum number of launch jobs this agent can run in parallel. Defaults to 1. Set to -1 for no upper limit | -| `--config`, `-c` | path to the agent config yaml to use | -| `--verbose`, `-v` | Display verbose output (default: 0) | +| Flag | Type | Description | +|------|------|-------------| +| `--queue, -q` | STR | The name of a queue for the agent to watch. Multiple -q flags supported. **Default:** None | +| `--entity, -e` | STR | The entity to use. Defaults to current logged-in user **Default:** None | +| `--log-file, -l` | STR | 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. **Default:** None | +| `--max-jobs, -j` | STR | The maximum number of launch jobs this agent can run in parallel. Defaults to 1. Set to -1 for no upper limit **Default:** None | +| `--config, -c` | STR | path to the agent config yaml to use **Default:** None | +| `--url, -u` | STR | a wandb client registration URL, this is generated in the UI **Default:** None | +| `--verbose, -v` | INT | Display verbose output **Default:** 0 | + diff --git a/models/ref/cli/wandb-launch-sweep.mdx b/models/ref/cli/wandb-launch-sweep.mdx index bd2bfb06c8..5f900e77ad 100644 --- a/models/ref/cli/wandb-launch-sweep.mdx +++ b/models/ref/cli/wandb-launch-sweep.mdx @@ -1,39 +1,36 @@ --- -title: "wandb launch-sweep" +title: wandb launch-sweep --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-launch-sweep.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbLaunchSweep from "/snippets/en/_includes/cli/wandb-launch-sweep.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Run a W&B launch sweep (Experimental). + ## Usage -```bash -wandb launch-sweep [CONFIG] [OPTIONS] +```shell +wandb launch-sweep [OPTIONS] [CONFIG] ``` +## Description + + +Run a W&B launch sweep (Experimental). + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `CONFIG` | No description available | No | +| Name | Default | Type | +|------|---------|------| +| `config` | None | PATH | ## Options -| Option | Description | -| :--- | :--- | -| `--queue`, `-q` | The name of a queue to push the sweep to | -| `--project`, `-p` | Name of the project which the agent will watch. If passed in, will override the project value passed in using a config file | -| `--entity`, `-e` | The entity to use. Defaults to current logged-in user | -| `--resume_id`, `-r` | Resume a launch sweep by passing an 8-char sweep id. Queue required | -| `--prior_run`, `-R` | ID of an existing run to add to this sweep | +| Flag | Type | Description | +|------|------|-------------| +| `--queue, -q` | STR | The name of a queue to push the sweep to **Default:** None | +| `--project, -p` | STR | Name of the project which the agent will watch. If passed in, will override the project value passed in using a config file **Default:** None | +| `--entity, -e` | STR | The entity to use. Defaults to current logged-in user **Default:** None | +| `--resume_id, -r` | STR | Resume a launch sweep by passing an 8-char sweep id. Queue required **Default:** None | +| `--prior_run, -R` | STR | ID of an existing run to add to this sweep **Default:** None | + diff --git a/models/ref/cli/wandb-launch.mdx b/models/ref/cli/wandb-launch.mdx index a0d02562ea..f5310d53f4 100644 --- a/models/ref/cli/wandb-launch.mdx +++ b/models/ref/cli/wandb-launch.mdx @@ -1,45 +1,66 @@ --- -title: "wandb launch" +title: wandb launch --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-launch.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbLaunch from "/snippets/en/_includes/cli/wandb-launch.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Launch or queue a W&B Job. See https://wandb.me/launch + ## Usage -```bash +```shell wandb launch [OPTIONS] ``` + +## Description + + +Launch or queue a W&B Job. See https://wandb.me/launch + + ## Options -| Option | Description | -| :--- | :--- | -| `--uri`, `-u` | Local path or git repo uri to launch. If provided this command will create a job from the specified uri. | -| `--job`, `-j` | Name of the job to launch. If passed in, launch does not require a uri. | -| `--entry-point`, `-E` | 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` | 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. | -| `--entity`, `-e` | 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. | -| `--project`, `-p` | 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. | -| `--resource`, `-r` | 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. | -| `--docker-image`, `-d` | 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`, `-B` | Docker image to run job code in. Incompatible with --docker-image. | -| `--config`, `-c` | 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. | -| `--set-var`, `-v` | Set template variable values for queues with allow listing enabled, as key-value pairs e.g. `--set-var key1=value1 --set-var key2=value2` | -| `--queue`, `-q` | Name 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. | -| `--async` | Flag 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. (default: False) | -| `--resource-args`, `-R` | 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`, `-D` | Path to the Dockerfile used to build the job, relative to the job's root | -| `--priority`, `-P` | When --queue is passed, set the priority of the job. Launch jobs with higher priority are served first. The order, from highest to lowest priority, is: critical, high, medium, low | +| Flag | Type | Description | +|------|------|-------------| +| `--uri, -u` | STR | Local path or git repo uri to launch. If provided this command will create a job from the specified uri. **Default:** None | +| `--job, -j` | STR | Name of the job to launch. If passed in, launch does not require a uri. **Default:** None | +| `--entry-point, -E` | STR | 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. **Default:** None | +| `--git-version, -g` | STR | Version of the project to run, as a Git commit reference for Git projects. **Default:** None | +| `--build-context` | STR | Path to the build context within the source code. Defaults to the root of the source code. Compatible only with -u. **Default:** None | +| `--job-name, -J` | STR | Name for the job created if the -u,--uri flag is passed in. **Default:** None | +| `--name` | STR | 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. **Default:** None | +| `--entity, -e` | 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. **Default:** None | +| `--project, -p` | 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. **Default:** None | +| `--resource, -r` | STR | 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. **Default:** None | +| `--docker-image, -d` | STR | 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. **Default:** None | +| `--base-image, -B` | STR | Docker image to run job code in. Incompatible with --docker-image. **Default:** None | +| `--config, -c` | STR | 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. **Default:** None | +| `--set-var, -v` | STR | Set template variable values for queues with allow listing enabled, +as key-value pairs e.g. `--set-var key1=value1 --set-var key2=value2` **Default:** None | +| `--queue, -q` | STR | Name 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. **Default:** None | +| `--async` | BOOL Flag | Flag 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. **Default:** False | +| `--resource-args, -R` | STR | 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. **Default:** None | +| `--build, -b` | BOOL Flag | Flag to build an associated job and push to queue as an image job. **Default:** False | +| `--repository, -rg` | STR | Name of a remote repository. Will be used to push a built image to. **Default:** None | +| `--project-queue, -pq` | STR | Name of the project containing the queue to push to. If none, defaults to entity level queues. **Default:** None | +| `--dockerfile, -D` | STR | Path to the Dockerfile used to build the job, relative to the job's root **Default:** None | +| `--priority, -P` | Choice | When --queue is passed, set the priority of the job. Launch jobs with higher priority +are served first. The order, from highest to lowest priority, is: critical, high, medium, low **Default:** None | + diff --git a/models/ref/cli/wandb-local.mdx b/models/ref/cli/wandb-local.mdx deleted file mode 100644 index 3be7c495e5..0000000000 --- a/models/ref/cli/wandb-local.mdx +++ /dev/null @@ -1,32 +0,0 @@ ---- -title: "wandb local" ---- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-local.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: - -import WandbLocal from "/snippets/en/_includes/cli/wandb-local.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} - -Start a local W&B container (deprecated, see wandb server --help) - -## Usage - -```bash -wandb local [OPTIONS] -``` - -## Options - -| Option | Description | -| :--- | :--- | -| `--port`, `-p` | The host port to bind W&B local on (default: 8080) | -| `--env`, `-e` | Env vars to pass to wandb/local (default: []) | -| `--daemon` | Run or don't run in daemon mode (default: True) | -| `--upgrade` | Upgrade to the most recent version (default: False) | diff --git a/models/ref/cli/wandb-login.mdx b/models/ref/cli/wandb-login.mdx index e984ce95c1..d65bbcba83 100644 --- a/models/ref/cli/wandb-login.mdx +++ b/models/ref/cli/wandb-login.mdx @@ -1,27 +1,89 @@ --- -title: "wandb login" +title: wandb login --- -import WandbLogin from "/snippets/en/_includes/cli/wandb-login.mdx"; - +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb login [KEY] [OPTIONS] +```shell +wandb login [OPTIONS] [KEY]... ``` +## Description + + +Authenticate your machine with W&B. + + Store an API key locally for authenticating with W&B services. + By default, credentials are stored without server-side verification. + + If no API key is provided as an argument, the command looks for + credentials in the following order: + + 1. The `WANDB_API_KEY` environment variable + 2. The `api_key` setting in a system or workspace settings file + 3. The `.netrc` file (`~/.netrc`, `~/_netrc`, or the `NETRC` env var path) + 4. An interactive prompt (if a TTY is available) + + For self-hosted or dedicated cloud deployments, specify the server + URL with `--host`, or set the `WANDB_BASE_URL` environment variable. + + ## Examples + + Log in interactively (prompts for API key) + + ```bash + wandb login + ``` + + Log in with an explicit API key ("WANDB_API_KEY_EXAMPLE") + + ```bash + wandb login WANDB_API_KEY_EXAMPLE + ``` + + Log in and verify the API key is valid + + ```bash + wandb login --verify + ``` + + Log in to the W&B public cloud instead of a configured self-hosted instance + + ```bash + wandb login --cloud + ``` + + Log in to a self-hosted W&B instance + + ```bash + wandb login --host https://my-wandb-server.example.com + ``` + + Force a new login prompt even if already authenticated + + ```bash + wandb login --relogin + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `KEY` | No description available | No | +| Name | Default | Type | +|------|---------|------| +| `key` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--cloud` | Login to the cloud instead of local (default: False) | -| `--host`, `--base-url` | Login to a specific instance of W&B | -| `--relogin` | Force relogin if already logged in. | -| `--verify` | Verify login credentials (default: False) | +| Flag | Type | Description | +|------|------|-------------| +| `--cloud` | BOOL Flag | Log in to the W&B public cloud (https://api.wandb.ai). Mutually exclusive with --host. **Default:** False | +| `--host, --base-url` | STR | Log in to a specific W&B server instance by URL (e.g. https://my-wandb.example.com). Mutually exclusive with --cloud. **Default:** None | +| `--relogin` | BOOL Flag | Force a new login prompt, ignoring any existing credentials. **Default:** None | +| `--anonymously` | BOOL Flag | Deprecated. Has no effect and will be removed in a future version. **Default:** False | +| `--verify / --no-verify` | BOOL Flag | Verify the API key with W&B after storing it. If verification is successful, display the source of the credentials and the default team. **Default:** False | + diff --git a/models/ref/cli/wandb-off.mdx b/models/ref/cli/wandb-off.mdx deleted file mode 100644 index 90eff10c05..0000000000 --- a/models/ref/cli/wandb-off.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "wandb off" ---- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-off.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: - -import WandbOff from "/snippets/en/_includes/cli/wandb-off.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} - -## Usage - -```bash -wandb off -``` diff --git a/models/ref/cli/wandb-offline.mdx b/models/ref/cli/wandb-offline.mdx index 9c5f569aa9..d2cc56fae3 100644 --- a/models/ref/cli/wandb-offline.mdx +++ b/models/ref/cli/wandb-offline.mdx @@ -1,25 +1,48 @@ --- -title: "wandb offline" +title: wandb offline --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-offline.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbOffline from "/snippets/en/_includes/cli/wandb-offline.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - + + +## Usage + +```shell +wandb offline [OPTIONS] +``` + + +## Description - The snippet will be auto-detected on the next regeneration. -*/} Save data logged to W&B locally without uploading it to the cloud. -Use `wandb online` or `wandb sync` to upload offline runs. + Use `wandb online` or `wandb sync` to upload offline runs. -## Usage + ## Examples + + Run a script in offline mode to log data locally without syncing to the cloud + + ```bash + wandb offline + python train.py # Logs data locally, does not sync to W&B cloud + ``` + + Run a script in offline mode, then sync the run to the cloud when ready + + ```bash + wandb offline + python train.py + wandb sync --sync-all # Sync all offline runs to the cloud + ``` + + + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | -```bash -wandb offline -``` diff --git a/models/ref/cli/wandb-on.mdx b/models/ref/cli/wandb-on.mdx deleted file mode 100644 index 144d585c0c..0000000000 --- a/models/ref/cli/wandb-on.mdx +++ /dev/null @@ -1,21 +0,0 @@ ---- -title: "wandb on" ---- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-on.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: - -import WandbOn from "/snippets/en/_includes/cli/wandb-on.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} - -## Usage - -```bash -wandb on -``` diff --git a/models/ref/cli/wandb-online.mdx b/models/ref/cli/wandb-online.mdx index a876242e99..b9995ca0b6 100644 --- a/models/ref/cli/wandb-online.mdx +++ b/models/ref/cli/wandb-online.mdx @@ -1,23 +1,33 @@ --- -title: "wandb online" +title: wandb online --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-online.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbOnline from "/snippets/en/_includes/cli/wandb-online.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Undo `wandb offline`. + ## Usage -```bash -wandb online +```shell +wandb online [OPTIONS] ``` + + +## Description + + +Re-enable cloud syncing for W&B runs. + + Clear the offline mode setting so subsequent runs in this directory + sync data to the W&B cloud. + + Undo a previous call to ``wandb offline``. + + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-projects.mdx b/models/ref/cli/wandb-projects.mdx deleted file mode 100644 index f8c1e3836b..0000000000 --- a/models/ref/cli/wandb-projects.mdx +++ /dev/null @@ -1,29 +0,0 @@ ---- -title: "wandb projects" ---- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-projects.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: - -import WandbProjects from "/snippets/en/_includes/cli/wandb-projects.mdx"; - - - - The snippet will be auto-detected on the next regeneration. -*/} - -List projects - -## Usage - -```bash -wandb projects [OPTIONS] -``` - -## Options - -| Option | Description | -| :--- | :--- | -| `--entity`, `-e` | The entity to scope the listing to. | diff --git a/models/ref/cli/wandb-pull.mdx b/models/ref/cli/wandb-pull.mdx index 7b5218eb0d..1e620c4904 100644 --- a/models/ref/cli/wandb-pull.mdx +++ b/models/ref/cli/wandb-pull.mdx @@ -1,36 +1,55 @@ --- -title: "wandb pull" +title: wandb pull --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-pull.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbPull from "/snippets/en/_includes/cli/wandb-pull.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Pull files from Weights & Biases + ## Usage -```bash -wandb pull RUN [OPTIONS] +```shell +wandb pull [OPTIONS] RUN ``` +## Description + + +Download files from a W&B run. + + Fetch all files assoicated with the specified run. Skip files that already + exist locally with the same content. Create subdirectories as needed to + mirror the structure of the files in W&B. + + Use the run ID to reference the run, and optionally specify the project + and entity if not included in the run argument. + + ## Examples + + Download files from a run with a run ID "abcd1234" in the default project and entity + + ```bash + wandb pull abcd1234 + ``` + + Download files from a run with run ID "abcd1234" in the "foobar" project and "team-awesome" entity + + ```bash + wandb pull -p foobar -e team-awesome abcd1234 + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `RUN` | No description available | Yes | +| Name | Default | Type | +|------|---------|------| +| `run` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--project`, `-p` | The project you want to download. | -| `--entity`, `-e` | The entity to scope the listing to. (default: models) | +| Flag | Type | Description | +|------|------|-------------| +| `--project, -p` | STR | The project containing the run to pull files from. **Default:** None | +| `--entity, -e` | STR | The entity that owns the project. Defaults to the value of the WANDB_ENTITY environment variable or the default entity if not set. **Default:** models | + diff --git a/models/ref/cli/wandb-restore.mdx b/models/ref/cli/wandb-restore.mdx index 32944f2606..dca03332d1 100644 --- a/models/ref/cli/wandb-restore.mdx +++ b/models/ref/cli/wandb-restore.mdx @@ -1,38 +1,84 @@ --- -title: "wandb restore" +title: wandb restore --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-restore.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbRestore from "/snippets/en/_includes/cli/wandb-restore.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Restore code, config and docker state for a run. Retrieves code from latest commit if code was not saved with `wandb.save()` or `wandb.init(save_code=True)`. + ## Usage -```bash -wandb restore RUN [OPTIONS] +```shell +wandb restore [OPTIONS] RUN ``` +## Description + + +Restore the code, config, and Docker state from a previous run. + + Recreate the environment of a previous W&B run so you can + reproduce it. Run this command from the same git repository + as the original run, unless you pass the `--no-git` flag. + + Restore in three steps: + + 1. Git — Check out the original commit on a new branch (`wandb/run_id`), + fetch and apply any saved diff patch, and fall back to an upstream + commit if the original commit cannot be found. + 2. Config — Write the run config to `wandb/config.yaml`. + 3. Docker — If the run used Docker, start the same image with the + original command. + + Accept run in any of these formats: + + - `run_id` + - `project:run_id` + - `entity/project:run_id` + - `entity/project/run_id` + + ## Examples + + Restore a run with run ID "abcd1234" in the default project and entity + + ```bash + wandb restore abcd1234 + ``` + + Restore a run from the "foobar" project and "team-awesome" entity with + run ID "abcd1234" + + ```bash + wandb restore team-awesome/foobar-project:abcd1234 + ``` + + Restore run "abcd1234" without restoring git state. Only restore config + and Docker state. + + ```bash + wandb restore --no-git abcd1234 + ``` + + Restore run "abcd1234" in detached HEAD mode instead of creating a branch + + ```bash + wandb restore --no-branch abcd1234 + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `RUN` | No description available | Yes | +| Name | Default | Type | +|------|---------|------| +| `run` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--no-git` | Don't restore git state (default: False) | -| `--branch` | Whether to create a branch or checkout detached (default: True) | -| `--project`, `-p` | The project you wish to upload to. | -| `--entity`, `-e` | The entity to scope the listing to. | +| Flag | Type | Description | +|------|------|-------------| +| `--no-git` | BOOL Flag | Skip git restoration. Only restore config and Docker state. **Default:** False | +| `--branch / --no-branch` | BOOL Flag | Create a wandb/run_id branch or check out the commit in detached HEAD mode. **Default:** True | +| `--project, -p` | STR | Specify the project to look up the run in. **Default:** None | +| `--entity, -e` | STR | Specify the entity to scope the run lookup to. **Default:** None | + diff --git a/models/ref/cli/wandb-scheduler.mdx b/models/ref/cli/wandb-scheduler.mdx index 931d2a9758..811640edd0 100644 --- a/models/ref/cli/wandb-scheduler.mdx +++ b/models/ref/cli/wandb-scheduler.mdx @@ -1,29 +1,32 @@ --- -title: "wandb scheduler" +title: wandb scheduler --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-scheduler.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbScheduler from "/snippets/en/_includes/cli/wandb-scheduler.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Run a W&B launch sweep scheduler (Experimental) + ## Usage -```bash -wandb scheduler SWEEP_ID +```shell +wandb scheduler [OPTIONS] SWEEP_ID ``` +## Description + + +Run a W&B launch sweep scheduler (Experimental) + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `SWEEP_ID` | No description available | Yes | +| Name | Default | Type | +|------|---------|------| +| `sweep_id` | None | STR | + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-server.mdx b/models/ref/cli/wandb-server.mdx index ece034bb15..6e9acbe44d 100644 --- a/models/ref/cli/wandb-server.mdx +++ b/models/ref/cli/wandb-server.mdx @@ -1,18 +1,27 @@ --- -title: "wandb server" +title: wandb server --- -Commands for operating a local W&B server +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb server COMMAND [ARGS]... +```shell +wandb server [OPTIONS] COMMAND [ARGS]... ``` -## Commands -| Command | Description | -| :--- | :--- | -| [start](/models/ref/cli/wandb-server/wandb-server-start) | Start a local W&B server | -| [stop](/models/ref/cli/wandb-server/wandb-server-stop) | Stop a local W&B server | +## Description + + +Commands for operating a local W&B server + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-server/wandb-server-start.mdx b/models/ref/cli/wandb-server/wandb-server-start.mdx index 72f3481249..ec61484601 100644 --- a/models/ref/cli/wandb-server/wandb-server-start.mdx +++ b/models/ref/cli/wandb-server/wandb-server-start.mdx @@ -1,31 +1,63 @@ --- -title: "wandb server start" +title: wandb server-start --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-server-start.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbServerStart from "/snippets/en/_includes/cli/wandb-server-start.mdx"; - +Start a local W&B server in a Docker container. - The snippet will be auto-detected on the next regeneration. -*/} + Pull and run the `wandb/local` Docker image (local instance + of the W&B server). -Start a local W&B server + Map the specified port on the host to port `8080` in the container and + mount a persistent Docker volume named `wandb` to store data. + + If a newer image is available, notify the user to upgrade to the latest + version (`wandb server start --upgrade`). + + If a container named `wandb-local` is already running, notify the user + to stop it before starting a new one. + + Set the `base_url` setting to the local server URL so that W&B client + calls use the local server. If no API key is found, prompt the user to log in. + + Requires Docker to be installed and running on the host machine. + + ## Examples + + Launch a local W&B server on port 8080 in the background. + + ```bash + wandb server start + ``` + + Run the server on port 9090 instead of the default 8080. + + ```bash + wandb server start -p 9090 + ``` + + Run the server in the foreground so logs stream directly to the terminal + + ```bash + wandb server start --no-daemon + ``` + ## Usage -```bash +```shell wandb server start [OPTIONS] ``` + ## Options -| Option | Description | -| :--- | :--- | -| `--port`, `-p` | The host port to bind W&B server on (default: 8080) | -| `--env`, `-e` | Env vars to pass to wandb/local (default: []) | -| `--daemon` | Run or don't run in daemon mode (default: True) | +| Flag | Type | Description | +|------|------|-------------| +| `-p, --port` | STRING | The host port to bind W&B server on. **Default:** 8080 | +| `-e, --env` | STRING | Environment variables to pass to wandb/local Docker image. **Default:** [] | +| `--daemon` | BOOL | Run the server in the background. Use --no-daemon to run in the foreground. **Default:** True | +| `--upgrade` | BOOL | Pull the latest wandb/local Docker image before starting. Stop any existing container. **Default:** False | +| `--edge` | BOOL | Use the bleeding edge **Default:** False | +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-server/wandb-server-stop.mdx b/models/ref/cli/wandb-server/wandb-server-stop.mdx index 19fa4a7621..c498c92caf 100644 --- a/models/ref/cli/wandb-server/wandb-server-stop.mdx +++ b/models/ref/cli/wandb-server/wandb-server-stop.mdx @@ -1,23 +1,30 @@ --- -title: "wandb server stop" +title: wandb server-stop --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-server-stop.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbServerStop from "/snippets/en/_includes/cli/wandb-server-stop.mdx"; - +Stop a running local W&B server. - The snippet will be auto-detected on the next regeneration. -*/} + Stops the Docker container named ``wandb-local`` that was started + by ``wandb server start``. Requires Docker to be installed. -Stop a local W&B server + ## Examples + + ```bash + wandb server stop + ``` + ## Usage -```bash -wandb server stop +```shell +wandb server stop [OPTIONS] ``` + + +## Options + +| Flag | Type | Description | +|------|------|-------------| +| `--help` | BOOL | Show this message and exit. **Default:** False | + diff --git a/models/ref/cli/wandb-status.mdx b/models/ref/cli/wandb-status.mdx index 359dceee97..1e2da59696 100644 --- a/models/ref/cli/wandb-status.mdx +++ b/models/ref/cli/wandb-status.mdx @@ -1,29 +1,39 @@ --- -title: "wandb status" +title: wandb status --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-status.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbStatus from "/snippets/en/_includes/cli/wandb-status.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Show configuration settings + ## Usage -```bash +```shell wandb status [OPTIONS] ``` + +## Description + + +Display the current W&B configuration settings. + + Print all active W&B settings as formatted JSON, including the + base URL, API key, project, entity, and other resolved values. + + ## Examples + + Show current settings + + ```bash + wandb status + ``` + + + ## Options -| Option | Description | -| :--- | :--- | -| `--settings` | Show the current settings (default: True) | +| Flag | Type | Description | +|------|------|-------------| +| `--settings / --no-settings` | BOOL Flag | Display the current settings. **Default:** True | + diff --git a/models/ref/cli/wandb-sweep.mdx b/models/ref/cli/wandb-sweep.mdx index 76f706d51a..72e0a9b990 100644 --- a/models/ref/cli/wandb-sweep.mdx +++ b/models/ref/cli/wandb-sweep.mdx @@ -1,46 +1,117 @@ --- -title: "wandb sweep" +title: wandb sweep --- -{/* - To add introductory content for this command: - 1. Create the snippet file: /snippets/en/_includes/cli/wandb-sweep.mdx - 2. Add your intro content to that file - 3. Delete this entire comment block and keep only the two lines below: -import WandbSweep from "/snippets/en/_includes/cli/wandb-sweep.mdx"; +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; - - - The snippet will be auto-detected on the next regeneration. -*/} - -Initialize a hyperparameter sweep. Search for hyperparameters that optimizes a cost function of a machine learning model by testing various combinations. + ## Usage -```bash -wandb sweep CONFIG_YAML_OR_SWEEP_ID [OPTIONS] +```shell +wandb sweep [OPTIONS] CONFIG_YAML_OR_SWEEP_ID ``` +## Description + + +Create, update, or manage a hyperparameter sweep. + + Provide a YAML config file to create a sweep. Define the search + strategy, parameters, and metric to optimize in the config. + Register the sweep with the W&B server and print the sweep ID + and a command to start an agent. + + Provide a sweep ID (or full path `entity/project/sweep_id`) with a + state flag (`--stop`, `--cancel`, `--pause`, or `--resume`) to manage + an existing sweep. + + The sweep ID is a unique identifier for the sweep, generated by + W&B when the sweep is created. You can find the sweep ID in the W&B App + or in the output of the `wandb sweep` command when you create a new sweep. + + ## Examples + + Create a sweep using the configuration defined in `sweep_config.yaml`. Use + the current user's default entity and project. + + ```bash + wandb sweep sweep_config.yaml + ``` + + Create a sweep and store the results under the "team-awesome" entity + and "foobar-project" project. + + ```bash + wandb sweep -p foobar-project -e team-awesome sweep_config.yaml + ``` + + Update sweep `abcd1234` with a new configuration from `sweep_config.yaml`. + This is useful for changing the parameters or search strategy of an + active sweep. + + ```bash + wandb sweep --update abcd1234 sweep_config.yaml + ``` + + Stop sweep `abcd1234` under the "team-awesome" entity and "foobar-project" project. + + ```bash + wandb sweep --stop team-awesome/foobar-project/abcd1234 + ``` + + Cancel sweep `abcd1234` in the current user's default entity and project. + + ```bash + wandb sweep --cancel abcd1234 + ``` + + Pause sweep `abcd1234` in the current user's default entity and + project. Later, resume the sweep. + + ```bash + wandb sweep --pause abcd1234 + wandb sweep --resume abcd1234 + ``` + + Create a sweep with a local controller that uses the configuration + in `sweep_config.yaml`. + + ```bash + wandb sweep --controller sweep_config.yaml + ``` + + Create a new sweep and include two previously completed runs + (run ID `abcd1234` and run ID `efgh5678`) so their results are incorporated + into the sweep's hyperparameter search. + + ```bash + wandb sweep -R abcd1234 -R efgh5678 sweep_config.yaml + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `CONFIG_YAML_OR_SWEEP_ID` | No description available | Yes | +| Name | Default | Type | +|------|---------|------| +| `config_yaml_or_sweep_id` | None | STR | ## Options -| Option | Description | -| :--- | :--- | -| `--project`, `-p` | 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. | -| `--entity`, `-e` | 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 (default: False) | -| `--verbose` | Display verbose output (default: False) | -| `--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. (default: False) | -| `--cancel` | Cancel a sweep to kill all running runs and stop running new runs. (default: False) | -| `--pause` | Pause a sweep to temporarily stop running new runs. (default: False) | -| `--resume` | Resume a sweep to continue running new runs. (default: False) | -| `--prior_run`, `-R` | ID of an existing run to add to this sweep | +| Flag | Type | Description | +|------|------|-------------| +| `--project, -p` | STR | Set the project for sweep runs. Use 'Uncategorized' if not set. **Default:** None | +| `--entity, -e` | STR | Set the entity for sweep. Use the current user's default entity if not set. **Default:** None | +| `--controller` | BOOL Flag | Start a local sweep controller after creating the sweep. **Default:** False | +| `--verbose` | BOOL Flag | Display verbose output. **Default:** False | +| `--name` | STR | Set a display name for the sweep. Use the sweep ID if not specified. **Default:** None | +| `--program` | STR | Override the training program specified in the sweep config. **Default:** None | +| `--settings` | STR | Set sweep settings **Default:** None | +| `--update` | STR | Update an existing sweep configuration. Pass the sweep ID. **Default:** None | +| `--stop` | BOOL Flag | Stop a sweep. Let active runs finish but do not start new runs. **Default:** False | +| `--cancel` | BOOL Flag | Cancel a sweep. Kill active runs and stop starting new ones. **Default:** False | +| `--pause` | BOOL Flag | Pause a sweep. Temporarily stop starting new runs. **Default:** False | +| `--resume` | BOOL Flag | Resume a paused sweep. **Default:** False | +| `--prior_run, -R` | STR | Attach an existing run to this sweep by ID. Specify multiple times to attach multiple runs. **Default:** None | + diff --git a/models/ref/cli/wandb-sync.mdx b/models/ref/cli/wandb-sync.mdx index 2017c24656..fd8f60d73f 100644 --- a/models/ref/cli/wandb-sync.mdx +++ b/models/ref/cli/wandb-sync.mdx @@ -1,42 +1,118 @@ --- -title: "wandb sync" +title: wandb sync --- -import WandbSync from "/snippets/en/_includes/cli/wandb-sync.mdx"; - +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash -wandb sync [PATH] [OPTIONS] +```shell +wandb sync [OPTIONS] [PATH]... ``` +## Description + + +Upload existing local W&B run data to the cloud. + + Sync offline or incomplete runs from the local `wandb` directory to + the W&B server. If `PATH` is provided, sync runs at that path. If no + path is given, search for a `./wandb` directory, then a `wandb/` + subdirectory. + + Run without arguments to print a summary of synced and unsynced + runs without uploading anything. + + When syncing a specific path, include TensorBoard event files + by default. When using `--sync-all`, disable TensorBoard by + default (use `--sync-tensorboard` to enable it). + + `PATH` is a `.wandb` file or a run directory that contains a `.wandb` file. + A typical path looks like + `./wandb/run-YYYYMMDD_HHMMSS-RUN_ID/run-RUN_ID.wandb`, + where `run-YYYYMMDD_HHMMSS-RUN_ID` is the run directory and + `run-RUN_ID.wandb` is the `.wandb` file. `YYYYMMDD_HHMMSS` is the + timestamp of when the run was created and `RUN_ID` is the unique ID + of the run. + + ## Examples + + Show a summary of local runs and their sync status + + ```bash + wandb sync + ``` + + Sync a run that is locally saved at `./wandb/run-20170617_000000-abcd1234` + + ```bash + wandb sync ./wandb/run-20170617_000000-abcd1234 + ``` + + Sync a specific run by its `.wandb` filepath + + ```bash + wandb sync ./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb + ``` + + Sync all unsynced runs in the local wandb directory + + ```bash + wandb sync --sync-all + ``` + + Sync a run in the "foobar-project" project and "team-awesome" entity by its `.wandb` filepath + + ```bash + wandb sync --project foobar-project --entity team-awesome ./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb + ``` + + Delete local data for runs that have already been synced + + ```bash + wandb sync --clean + ``` + + Delete synced runs older than 48 hours without a confirmation prompt + + ```bash + wandb sync --clean --clean-old-hours 48 --clean-force + ``` + + + ## Arguments -| Argument | Description | Required | -| :--- | :--- | :--- | -| `PATH` | No description available | No | +| Name | Default | Type | +|------|---------|------| +| `path` | None | PATH | ## Options -| Option | Description | -| :--- | :--- | -| `--id` | The run you want to upload to. | -| `--project`, `-p` | The project you want to upload to. | -| `--entity`, `-e` | The entity to scope to. | -| `--job_type` | Specifies the type of run for grouping related runs together. | -| `--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` | Include online runs | -| `--include-offline` | Include offline runs | -| `--include-synced` | Include synced runs | -| `--mark-synced` | Mark runs as synced (default: True) | -| `--sync-all` | Sync all runs (default: False) | -| `--clean` | Delete synced runs (default: False) | -| `--clean-old-hours` | Delete runs created before this many hours. To be used alongside --clean flag. (default: 24) | -| `--clean-force` | Clean without confirmation prompt. (default: False) | -| `--show` | Number of runs to show (default: 5) | -| `--append` | Append run (default: False) | -| `--skip-console` | Skip console logs (default: False) | -| `--replace-tags` | Replace tags in the format 'old_tag1=new_tag1,old_tag2=new_tag2' | +| Flag | Type | Description | +|------|------|-------------| +| `--view` | BOOL Flag | View runs. **Default:** False | +| `--verbose` | BOOL Flag | Enable verbose output. **Default:** False | +| `--id` | STR | Upload to an existing run ID. **Default:** None | +| `--project, -p` | STR | Set the project to upload the run to. **Default:** None | +| `--entity, -e` | STR | Set the entity to scope the project to. **Default:** None | +| `--job_type` | STR | Set the job type to group related runs. **Default:** None | +| `--sync-tensorboard / --no-sync-tensorboard` | BOOL Flag | Sync TensorBoard tfevent files. On by default for specific paths, off for --sync-all. **Default:** None | +| `--include-globs` | STR | Include only runs matching these glob patterns (comma-separated). **Default:** None | +| `--exclude-globs` | STR | Exclude runs matching these glob patterns (comma-separated). **Default:** None | +| `--include-online / --no-include-online` | BOOL Flag | Include runs created in online mode. **Default:** None | +| `--include-offline / --no-include-offline` | BOOL Flag | Include runs created in offline mode. **Default:** None | +| `--include-synced / --no-include-synced` | BOOL Flag | Include runs that are already synced. **Default:** None | +| `--mark-synced / --no-mark-synced` | BOOL Flag | Mark runs as synced after upload. **Default:** True | +| `--sync-all` | BOOL Flag | Sync all unsynced runs in the local wandb directory. **Default:** False | +| `--clean` | BOOL Flag | Delete local data for runs that are already synced. **Default:** False | +| `--clean-old-hours` | INT | Delete only synced runs older than this many hours (use with --clean). **Default:** 24 | +| `--clean-force` | BOOL Flag | Skip the confirmation prompt if --clean is specified. **Default:** False | +| `--ignore` | STR | No description available. **Default:** None | +| `--show` | INT | Set the number of runs to show in the summary. **Default:** 5 | +| `--append` | BOOL Flag | Append data to an existing run instead of creating a new run. **Default:** False | +| `--skip-console` | BOOL Flag | Skip uploading console logs. **Default:** False | +| `--replace-tags` | STR | Rename tags during sync. Use 'old=new' pairs separated by commas. **Default:** None | + diff --git a/models/ref/cli/wandb-verify.mdx b/models/ref/cli/wandb-verify.mdx index c6966db5a0..38b7e860c3 100644 --- a/models/ref/cli/wandb-verify.mdx +++ b/models/ref/cli/wandb-verify.mdx @@ -1,18 +1,64 @@ --- -title: "wandb verify" +title: wandb verify --- -import WandbVerify from "/snippets/en/_includes/cli/wandb-verify.mdx"; - +import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx'; + + ## Usage -```bash +```shell wandb verify [OPTIONS] ``` + +## Description + + +Run integration checks against a self-hosted W&B instance. + + Validate that a self-hosted or dedicated cloud W&B deployment is configured + and operating correctly. Do not run this command against the public W&B + cloud at `api.wandb.ai`. + + The following checks are run in order: + 1. Host check - Verify the host is not `api.wandb.ai`. + 2. Login check - Verify the API key authenticates successfully. + 3. Secure requests check - Verify requests use HTTPS. + 4. Large payload check - Verify the instance handles large payloads (~10MB). + 5. Secure requests check - Verify signed URL requests use HTTPS. + 6. CORS configuration - Verify the object store allows GET and PUT requests + from the W&B instance. + 7. W&B version - Verify the installed W&B package is compatible with the instance. + 8. Run check - Log metrics, save files, and download files to verify runs + are recorded and accessible. + 9. Artifact check - Save and download artifacts to verify artifact storage + and retrieval work correctly. + 10. Sweeps check - Create and execute a random sweep to verify the sweep + system functions correctly. + + Exits with `code 1` if any critical check fails. + + ## Examples + + Verify the currently configured W&B instance. + + ```bash + wandb verify --host https://my-wandb-instance.com + ``` + + Verify a specific self-hosted instance. + + ```bash + wandb verify --host https://my-wandb-server.example.com + ``` + + + ## Options -| Option | Description | -| :--- | :--- | -| `--host` | Test a specific instance of W&B | +| Flag | Type | Description | +|------|------|-------------| +| `--host` | STR | Target a specific W&B instance URL. Default to configured base URL. **Default:** None | +