Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -603,12 +603,21 @@
"group": "wandb beta",
"pages": [
"models/ref/cli/wandb-beta",
{
"group": "core",
"pages": [
"models/ref/cli/wandb-beta/wandb-beta-core",
"models/ref/cli/wandb-beta/wandb-beta-core/wandb-beta-core-start",
"models/ref/cli/wandb-beta/wandb-beta-core/wandb-beta-core-stop"
]
},
{
"group": "beta leet",
"pages": [
"models/ref/cli/wandb-beta/wandb-beta-leet",
"models/ref/cli/wandb-beta/wandb-beta-leet/wandb-beta-leet-config",
"models/ref/cli/wandb-beta/wandb-beta-leet/wandb-beta-leet-run"
"models/ref/cli/wandb-beta/wandb-beta-leet/wandb-beta-leet-run",
"models/ref/cli/wandb-beta/wandb-beta-leet/wandb-beta-leet-symon"
]
},
"models/ref/cli/wandb-beta/wandb-beta-sync"
Expand All @@ -629,13 +638,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",
{
Expand Down
6 changes: 1 addition & 5 deletions models/ref/cli.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "CLI Reference SDK 0.25.0"
title: "CLI Reference SDK 0.25.1"
description: "Use the W&B Command Line Interface (CLI) to log in, run jobs, execute sweeps, and more using shell commands"
---

Expand Down Expand Up @@ -45,13 +45,9 @@ wandb [OPTIONS] COMMAND [ARGS]...
| [launch](/models/ref/cli/wandb-launch) | Launch or queue a W&B Job. |
| [launch-agent](/models/ref/cli/wandb-launch-agent) | Run a W&B launch agent. |
| [launch-sweep](/models/ref/cli/wandb-launch-sweep) | Run a W&B launch sweep (Experimental). |
| [local](/models/ref/cli/wandb-local) | Start a local W&B container (deprecated, see wandb server --help) |
| [login](/models/ref/cli/wandb-login) | Verify and store your API key for authentication with W&B services. |
| [off](/models/ref/cli/wandb-off) | No description available |
| [offline](/models/ref/cli/wandb-offline) | Save data logged to W&B locally without uploading it to the cloud. |
| [on](/models/ref/cli/wandb-on) | No description available |
| [online](/models/ref/cli/wandb-online) | Undo `wandb offline`. |
| [projects](/models/ref/cli/wandb-projects) | List projects |
| [pull](/models/ref/cli/wandb-pull) | Pull files from Weights & Biases |
| [restore](/models/ref/cli/wandb-restore) | Restore code, config and docker state for a run. |
| [scheduler](/models/ref/cli/wandb-scheduler) | Run a W&B launch sweep scheduler (Experimental) |
Expand Down
83 changes: 62 additions & 21 deletions models/ref/cli/wandb-agent.mdx
Original file line number Diff line number Diff line change
@@ -1,38 +1,79 @@
---
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';

<WandbAgent/>

The snippet will be auto-detected on the next regeneration.
*/}
<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L1996" />


Run the W&B agent

## Usage

```bash
wandb agent SWEEP_ID [OPTIONS]
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` | STR | True |


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

28 changes: 19 additions & 9 deletions models/ref/cli/wandb-artifact.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
---
title: "wandb artifact"
title: wandb artifact
---

Commands for interacting with artifacts
import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L2853" />



## Usage

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

## Commands
## Description

Upload, download, and manage W&B artifacts.

## Subcommands

| 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 |
|---------|-------------|
| [`wandb artifact cache`](wandb-artifact/wandb-artifact-cache) | Manage the local artifact cache. |
| [`wandb artifact get`](wandb-artifact/wandb-artifact-get) | Download an artifact from W&B by its path. |
| [`wandb artifact ls`](wandb-artifact/wandb-artifact-ls) | List all artifacts in a W&B project. |
| [`wandb artifact put`](wandb-artifact/wandb-artifact-put) | Upload an artifact to W&B. |

26 changes: 20 additions & 6 deletions models/ref/cli/wandb-artifact/wandb-artifact-cache.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
---
title: "wandb artifact cache"
title: wandb artifact cache
---

Commands for interacting with the artifact cache
import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx';


<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L3105" />



## Usage

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

## Commands
## Description

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.

## Subcommands

| 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 |
|---------|-------------|
| [`wandb artifact cache cleanup`](wandb-artifact-cache/wandb-artifact-cache-cleanup) | Reduce the local artifact cache size. |

Original file line number Diff line number Diff line change
@@ -1,35 +1,53 @@
---
title: "wandb artifact cache cleanup"
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";
import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx';

<WandbArtifactCacheCleanup/>

The snippet will be auto-detected on the next regeneration.
*/}
<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L3117" />


Clean up less frequently used files from the artifacts cache

## Usage

```bash
wandb artifact cache cleanup TARGET_SIZE [OPTIONS]
cleanup [OPTIONS] TARGET_SIZE
```

## Description

Reduce the local artifact cache size.

Remove the least recently accessed files first 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
```


## Arguments

| Argument | Description | Required |
| :--- | :--- | :--- |
| `TARGET_SIZE` | No description available | Yes |
| Name | Default | Type |
|------|---------|------|
| `target_size` | STR | True |


## Options

| Option | Description |
| :--- | :--- |
| `--remove-temp` | Remove temp files (default: False) |
| Flag | Type | Description |
|------|------|-------------|
| `--remove-temp` | BOOL Flag | Also remove temporary files from the cache. **Default**: False |

57 changes: 38 additions & 19 deletions models/ref/cli/wandb-artifact/wandb-artifact-get.mdx
Original file line number Diff line number Diff line change
@@ -1,36 +1,55 @@
---
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";
import { GitHubLink } from '/snippets/en/_includes/github-source-link.mdx';

<WandbArtifactGet/>

The snippet will be auto-detected on the next regeneration.
*/}
<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L2993" />


Download an artifact from wandb

## Usage

```bash
wandb artifact get PATH [OPTIONS]
get [OPTIONS] PATH
```

## Description

Download an artifact from W&B by its path.

The PATH format is entity/project/artifact_name:version. If
the version is omitted, use the "latest" alias.

## 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
```


## Arguments

| Argument | Description | Required |
| :--- | :--- | :--- |
| `PATH` | No description available | Yes |
| Name | Default | Type |
|------|---------|------|
| `path` | STR | True |


## 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` | STR | Directory to download the artifact to. Uses the default artifact cache if not set. **Default**: None |
| `--type` | STR | Expected artifact type. Fails if the artifact does not match. **Default**: None |

Loading
Loading