Skip to content
Draft
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
12 changes: 1 addition & 11 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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",
{
Expand Down
87 changes: 63 additions & 24 deletions models/ref/cli/wandb-agent.mdx
Original file line number Diff line number Diff line change
@@ -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';

<WandbAgent/>

The snippet will be auto-detected on the next regeneration.
*/}

Run the W&B agent
<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L1994" />

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

29 changes: 18 additions & 11 deletions models/ref/cli/wandb-artifact.mdx
Original file line number Diff line number Diff line change
@@ -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';

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

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

24 changes: 16 additions & 8 deletions models/ref/cli/wandb-artifact/wandb-artifact-cache.mdx
Original file line number Diff line number Diff line change
@@ -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 |

This file was deleted.

50 changes: 28 additions & 22 deletions models/ref/cli/wandb-artifact/wandb-artifact-get.mdx
Original file line number Diff line number Diff line change
@@ -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";

<WandbArtifactGet/>
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 |

49 changes: 28 additions & 21 deletions models/ref/cli/wandb-artifact/wandb-artifact-ls.mdx
Original file line number Diff line number Diff line change
@@ -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";

<WandbArtifactLs/>
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 |

Loading
Loading