Skip to content
Open
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
9 changes: 4 additions & 5 deletions content/en/ref/cli/_index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
title: Command Line Interface
weight: 2
---

**Usage**
Expand Down Expand Up @@ -33,15 +32,15 @@ weight: 2
| launch | Launch or queue a W&B Job. |
| launch-agent | Run a W&B launch agent. |
| launch-sweep | Run a W&B launch sweep (Experimental). |
| login | Login to Weights & Biases |
| offline | Disable W&B sync |
| online | Enable W&B sync |
| login | Verify and store your API key for authentication with W&B... |
| offline | Save data logged to W&B locally without uploading it to... |
| online | Undo `wandb offline`. |
| pull | Pull files from Weights & Biases |
| restore | Restore code, config and docker state for a run. |
| scheduler | Run a W&B launch sweep scheduler (Experimental) |
| server | Commands for operating a local W&B server |
| status | Show configuration settings |
| sweep | Initialize a hyperparameter sweep. |
| sync | Upload an offline training directory to W&B |
| sync | Synchronize W&B run data to the cloud. |
| verify | Checks and verifies local instance of W&B. |

3 changes: 2 additions & 1 deletion content/en/ref/cli/wandb-beta/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: wandb beta

**Summary**

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


**Options**
Expand All @@ -21,5 +21,6 @@ Beta versions of wandb CLI commands. Requires wandb-core.

| **Command** | **Description** |
| :--- | :--- |
| leet | Launch W&B LEET: the Lightweight Experiment Exploration Tool. |
| sync | Upload .wandb files specified by PATHS. |

25 changes: 25 additions & 0 deletions content/en/ref/cli/wandb-beta/wandb-beta-leet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: wandb beta leet
---

**Usage**

`wandb beta leet [OPTIONS] [PATH]`

**Summary**

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.


**Options**

| **Option** | **Description** |
| :--- | :--- |



2 changes: 1 addition & 1 deletion content/en/ref/cli/wandb-beta/wandb-beta-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: wandb beta sync

**Usage**

`wandb beta sync [OPTIONS] WANDB_DIR`
`wandb beta sync [OPTIONS] [PATHS]...`

**Summary**

Expand Down
10 changes: 9 additions & 1 deletion content/en/ref/cli/wandb-login.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ title: wandb login

**Summary**

Login to Weights & Biases
Verify and store your API key for authentication with W&B services.

By default, only store credentials locally without verifying them with W&B.
To verify credentials, set `--verify=True`.

For server deployments (dedicated cloud or customer-managed instances),
specify the host URL using the `--host` flag. You can also set environment
variables `WANDB_BASE_URL` and `WANDB_API_KEY` instead of running the
`login` command with host parameters.


**Options**
Expand Down
4 changes: 3 additions & 1 deletion content/en/ref/cli/wandb-offline.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ title: wandb offline

**Summary**

Disable W&B sync
Save data logged to W&B locally without uploading it to the cloud.

Use `wandb online` or `wandb sync` to upload offline runs.


**Options**
Expand Down
2 changes: 1 addition & 1 deletion content/en/ref/cli/wandb-online.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ title: wandb online

**Summary**

Enable W&B sync
Undo `wandb offline`.


**Options**
Expand Down
10 changes: 9 additions & 1 deletion content/en/ref/cli/wandb-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ title: wandb sync

**Summary**

Upload an offline training directory to W&B
Synchronize W&B run data to the cloud.

If PATH is provided, sync runs found at the given path. If a path is not
specified, search for `./wandb` first, then search for a `wandb/`
subdirectory.

To sync a specific run:
wandb sync ./wandb/run-20250813_124246-n67z9ude
Or equivalently:
wandb sync ./wandb/run-20250813_124246-n67z9ude/run-n67z9ude.wandb

**Options**

Expand Down
8 changes: 8 additions & 0 deletions content/en/ref/python/.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title:
---

<!-- Insert buttons and diff -->


{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.22.2/wandb/**init**.py >}}
58 changes: 35 additions & 23 deletions content/en/ref/python/_index.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,49 @@
---
title: Python SDK 0.22.0
module:
weight: 1
title: Python Library
---
The W&B Python SDK, accessible at `wandb`, enables you to train and fine-tune models, and manage models from experimentation to production.

> After performing your training and fine-tuning operations with this SDK, you can use [the Public API]({{< relref "/ref/python/public-api" >}}) to query and analyze the data that was logged, and [the Reports and Workspaces API]({{< relref "/ref/wandb_workspaces" >}}) to generate a web-publishable [report]({{< relref "/guides/core/reports" >}}) summarizing your work.
<!-- Insert buttons and diff -->

## Installation and setup

### Sign up and create an API key

To authenticate your machine with W&B, you must first generate an API key at https://wandb.ai/authorize.
Use wandb to track machine learning work.

### Install and import packages
Train and fine-tune models, manage models from experimentation to production.

Install the W&B library.
For guides and examples, see https://docs.wandb.ai.

```
pip install wandb
```
For scripts and interactive notebooks, see https://github.com/wandb/examples.

### Import W&B Python SDK:
For reference documentation, see https://docs.wandb.com/ref/python.

```python
import wandb
## Classes

# Specify your team entity
entity = "<team_entity>"
[`class Artifact`](./artifact.md): Flexible and lightweight building block for dataset and model versioning.

# Project that the run is recorded to
project = "my-awesome-project"
[`class Run`](./run.md): A unit of computation logged by W&B. Typically, this is an ML experiment.

with wandb.init(entity=entity, project=project) as run:
run.log({"accuracy": 0.9, "loss": 0.1})
````
## Functions

[`agent(...)`](./agent.md): Start one or more sweep agents.

[`controller(...)`](./controller.md): Public sweep controller constructor.

[`finish(...)`](./finish.md): Finish a run and upload any remaining data.

[`init(...)`](./init.md): Start a new run to track and log to W&B.

[`log(...)`](./log.md): Upload run data.

[`login(...)`](./login.md): Set up W&B login credentials.

[`save(...)`](./save.md): Sync one or more files to W&B.

[`sweep(...)`](./sweep.md): Initialize a hyperparameter sweep.

[`watch(...)`](./watch.md): Hook into given PyTorch model to monitor gradients and the model's computational graph.

| Other Members | |
| :--- | :--- |
| `__version__`<a id="__version__"></a> | `'0.22.2'` |
| `config`<a id="config"></a> | |
| `summary`<a id="summary"></a> | |
29 changes: 29 additions & 0 deletions content/en/ref/python/agent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: agent
---

{{< cta-button githubLink=https://www.github.com/wandb/wandb/tree/v0.22.2/wandb/wandb_agent.py#L560-L604 >}}

Start one or more sweep agents.

```python
agent(
sweep_id: str,
function: Optional[Callable] = None,
entity: Optional[str] = None,
project: Optional[str] = None,
count: Optional[int] = None
) -> None
```

The sweep agent uses the `sweep_id` to know which sweep it
is a part of, what function to execute, and (optionally) how
many agents to run.

| Args | |
| :--- | :--- |
| `sweep_id` | The unique identifier for a sweep. A sweep ID is generated by W&B CLI or Python SDK. |
| `function` | A function to call instead of the "program" specified in the sweep config. |
| `entity` | 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. |
| `project` | 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". |
| `count` | The number of sweep config trials to try. |
Loading