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 @@ -575,13 +575,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 @@ -610,13 +604,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
162 changes: 138 additions & 24 deletions models/ref/cli/wandb-agent.mdx
Original file line number Diff line number Diff line change
@@ -1,38 +1,152 @@
---
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/>
<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/cli/cli.py#L1994" />

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

Run the W&B agent
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
```


## Usage

```bash
wandb agent SWEEP_ID [OPTIONS]
```shell
wandb agent [OPTIONS] SWEEP_ID
```

## Arguments

| Argument | Description | Required |
| :--- | :--- | :--- |
| `SWEEP_ID` | No description available | Yes |

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

Set the project to upload runs to.

| Flag | Default | Type |
|------|---------|------|
| `-p, --project` | None | STRING |

### `entity`

Set the entity to scope the project to.

| Flag | Default | Type |
|------|---------|------|
| `-e, --entity` | None | STRING |

### `count`

Maximum number of runs this agent will execute. Continues until the sweep completes if not set.

| Flag | Default | Type |
|------|---------|------|
| `--count` | None | INT |

### `forward_signals`

Forward signals (e.g. SIGINT/SIGTERM) to child runs so they can shut down cleanly.

| Flag | Default | Type |
|------|---------|------|
| `-f, --forward-signals` | False | BOOL |

### `help`

Show this message and exit.

| Flag | Default | Type |
|------|---------|------|
| `--help` | False | BOOL |

## CLI Help

```
Usage: agent [OPTIONS] SWEEP_ID

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

Options:
-p, --project TEXT Set the project to upload runs to.
-e, --entity TEXT Set the entity to scope the project to.
--count INTEGER Maximum number of runs this agent will execute.
Continues until the sweep completes if not set.
-f, --forward-signals Forward signals (e.g. SIGINT/SIGTERM) to child runs
so they can shut down cleanly.
--help Show this message and exit.
```

47 changes: 36 additions & 11 deletions models/ref/cli/wandb-artifact.mdx
Original file line number Diff line number Diff line change
@@ -1,20 +1,45 @@
---
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" />


Upload, download, and manage W&B artifacts.

## Usage

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


## Options

### `help`

Show this message and exit.

| Flag | Default | Type |
|------|---------|------|
| `--help` | False | BOOL |

## CLI Help

```
Usage: artifact [OPTIONS] COMMAND [ARGS]...

## Commands
Upload, download, and manage W&B artifacts.

Options:
--help Show this message and exit.

Commands:
cache Manage the local artifact cache.
get Download an artifact from W&B by its path.
ls List all artifacts in a W&B project.
put Upload an artifact to W&B.
```

| 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 |
46 changes: 38 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,47 @@
---
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]...
```


## Options

### `help`

Show this message and exit.

| Flag | Default | Type |
|------|---------|------|
| `--help` | False | BOOL |

## CLI Help

```
Usage: artifact cache [OPTIONS] COMMAND [ARGS]...

Manage the local artifact cache.

## Commands
Cache downloaded artifact files locally to avoid redundant downloads.

Use subcommands to inspect and reclaim disk space used by the cache.

Options:
--help Show this message and exit.

Commands:
cleanup Reduce the local artifact cache size.
```

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

This file was deleted.

Loading
Loading