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
91 changes: 90 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,10 @@
"support/models/tags/administrator",
"support/models/tags/alerts",
"support/models/tags/anonymous",
"support/models/tags/api",
"support/models/tags/api-keys",
"support/models/tags/artifacts",
"support/models/tags/authentication",
"support/models/tags/aws",
"support/models/tags/billing",
"support/models/tags/charts",
Expand All @@ -1273,6 +1276,7 @@
"support/models/tags/logs",
"support/models/tags/metrics",
"support/models/tags/notebooks",
"support/models/tags/org-management",
"support/models/tags/outage",
"support/models/tags/privacy",
"support/models/tags/projects",
Expand All @@ -1281,13 +1285,16 @@
"support/models/tags/resuming",
"support/models/tags/run-crashes",
"support/models/tags/runs",
"support/models/tags/sdk",
"support/models/tags/security",
"support/models/tags/storage",
"support/models/tags/sweeps",
"support/models/tags/tables",
"support/models/tags/team-management",
"support/models/tags/teams",
"support/models/tags/tensorboard",
"support/models/tags/user-management",
"support/models/tags/workspace",
"support/models/tags/workspaces",
"support/models/tags/wysiwyg"
]
Expand Down Expand Up @@ -1393,6 +1400,80 @@
}
],
"tab": "W&B Launch"
},
{
"tab": "Support: W&B Models",
"hidden": true,
"pages": [
"support/models",
"support/models/tags/academic",
"support/models/tags/administrator",
"support/models/tags/alerts",
"support/models/tags/anonymous",
"support/models/tags/api",
"support/models/tags/api-keys",
"support/models/tags/artifacts",
"support/models/tags/authentication",
"support/models/tags/aws",
"support/models/tags/billing",
"support/models/tags/charts",
"support/models/tags/connectivity",
"support/models/tags/environment-variables",
"support/models/tags/experiments",
"support/models/tags/hyperparameter",
"support/models/tags/inference",
"support/models/tags/logs",
"support/models/tags/metrics",
"support/models/tags/notebooks",
"support/models/tags/org-management",
"support/models/tags/outage",
"support/models/tags/privacy",
"support/models/tags/projects",
"support/models/tags/python",
"support/models/tags/reports",
"support/models/tags/resuming",
"support/models/tags/run-crashes",
"support/models/tags/runs",
"support/models/tags/sdk",
"support/models/tags/security",
"support/models/tags/storage",
"support/models/tags/sweeps",
"support/models/tags/tables",
"support/models/tags/team-management",
"support/models/tags/teams",
"support/models/tags/tensorboard",
"support/models/tags/user-management",
"support/models/tags/workspace",
"support/models/tags/workspaces",
"support/models/tags/wysiwyg"
]
},
{
"tab": "Support: W&B Weave",
"hidden": true,
"pages": [
"support/weave",
"support/weave/tags/client-info",
"support/weave/tags/code-capture",
"support/weave/tags/data-capture",
"support/weave/tags/evaluation",
"support/weave/tags/performance",
"support/weave/tags/system-info",
"support/weave/tags/trace-data",
"support/weave/tags/ui-rendering"
]
},
{
"tab": "Support: W&B Inference",
"hidden": true,
"pages": [
"support/inference",
"support/inference/tags/administrator",
"support/inference/tags/authentication-access",
"support/inference/tags/billing",
"support/inference/tags/quotas-rate-limits",
"support/inference/tags/server-errors"
]
}
]
},
Expand Down Expand Up @@ -5725,6 +5806,10 @@
"destination": "/support/models/articles/how-do-i-change-my-billing-address",
"source": "/models/support/change_billing_address"
},
{
"destination": "/support/models/articles/how-do-i-connect-to-wandb-self-managed",
"source": "/support/models/articles/how-do-i-connect-to-a-self-hosted-wb-server"
},
{
"destination": "/support/models/articles/how-can-i-change-the-directory-my-sweep-",
"source": "/models/support/change_directory_sweep_logs_locally"
Expand Down Expand Up @@ -5922,9 +6007,13 @@
"source": "/models/support/how_can_i_disable_logging_of_system_metrics_to_wb"
},
{
"destination": "/support/models/articles/how-can-i-log-in-to-wb-server",
"destination": "/support/models/articles/how-do-i-log-in-to-wandb-self-managed",
"source": "/models/support/how_can_i_log_in_to_wb_server"
},
{
"destination": "/support/models/articles/how-do-i-log-in-to-wandb-self-managed",
"source": "/support/models/articles/how-can-i-log-in-to-wb-server"
},
{
"destination": "/support/models/articles/how-can-i-overwrite-the-logs-from-previo",
"source": "/models/support/how_can_i_overwrite_the_logs_from_previous_steps"
Expand Down
41 changes: 35 additions & 6 deletions models/app/console-logs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,53 @@ W&B captures three types of console logs and adds a prefix to indicate each log'

## Console log settings

To control which types of console output W&B captures and displays, pass a `wandb.Settings` object to `wandb.init()` when you initialize a run. The relevant parameters are `show_errors`, `show_warnings`, `show_info`, and `silent`. For details on each parameter and its default value, see the [`wandb.Settings` reference](/models/ref/python/experiments/settings).
To control which types of console output W&B captures and displays, pass a [`wandb.Settings`](/models/ref/python/experiments/settings) object to `wandb.init()` when you initialize a run. The relevant parameters include `show_errors`, `show_warnings`, `show_info`, and `silent`. The [Settings reference](/models/ref/python/experiments/settings) lists every parameter and is generated from the SDK, so it stays current as new options are added.

The following example shows how to configure these settings:
The example below toggles whether informational messages, warnings, and errors from W&B appear in the **Logs** tab. Set `silent=True` to suppress all W&B console output (useful when you want a quiet training script):

```python
import wandb

settings = wandb.Settings(
show_errors=True, # Show error messages in the W&B App
silent=False, # Disable all W&B console output
show_warnings=True # Show warning messages in the W&B App
show_errors=True,
silent=False,
show_warnings=True,
)

with wandb.init(settings=settings) as run:
# Your training code here
run.log({"accuracy": 0.95})
```

For stdout and stderr capture (`console`), multipart uploads (`console_multipart`, `console_chunk_max_bytes`, `console_chunk_max_seconds`), and troubleshooting, see the sections below and the Settings reference. Distributed training and other edge cases are covered in [Why is console output not captured for my run?](/support/models/articles/why-is-console-output-not-captured-for-my-run).

### Multipart console logging

By default, W&B stores your script's stdout and stderr as a single `output.log` file and uploads it *when the run finishes*. While a run is active, the **Logs** tab streams output for viewing, but `output.log` does not appear on the **Files** tab until the run completes.

Enable multipart console logging when you need downloadable logs while a run is still active, when a run may crash before it finishes, or when you resume a run and want to preserve log output from earlier sessions. Set `console_multipart=True` (SDK v0.22.3 or later) so the SDK writes timestamped chunks under `logs/` and uploads each chunk when it closes. Use `console_chunk_max_bytes` and `console_chunk_max_seconds` to control rollover; see the [Settings reference](/models/ref/python/experiments/settings) for defaults and behavior when both are `0`.

<Note>
Uploaded chunks are immutable. Terminal control sequences that modify previous lines (for example, progress bars that use carriage returns) only affect the current chunk.
</Note>

```python
import wandb

with wandb.init(
project="my-project",
settings=wandb.Settings(
console_multipart=True,
console_chunk_max_bytes=1_000_000, # rotate at ~1 MB
console_chunk_max_seconds=60, # or every 60 seconds, whichever first
),
) as run:
print("Logs upload in chunks while this run is active.")
```

You must set `console_multipart` at `wandb.init` time. Upload cadence cannot be changed after a run has started.

For troubleshooting (console capture disabled, distributed training, resumed runs, and display limits), see [Why is console output not captured for my run?](/support/models/articles/why-is-console-output-not-captured-for-my-run) and [How do I download the console log file from a run?](/support/models/articles/how-do-i-download-the-console-log-file-from-a-run).

## Custom logging

If you already have your own logging setup, you can continue to use it alongside W&B. W&B captures console logs from your application, but it doesn't interfere with your own logging setup. You can use Python's built-in `print()` function or the `logging` module to log messages.
Expand Down
2 changes: 1 addition & 1 deletion models/integrations/pytorch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ Two `wandb` functions come into play here: `watch` and `log`.
`run.watch()` will log the gradients and the parameters of your model,
every `log_freq` steps of training.

All you need to do is call it before you start training.
Call `run.watch()` before you start training. For log modes, multiple models, and performance tips, see [How do I log gradients and model weights with wandb.watch?](/support/models/articles/how-do-i-log-gradients-and-model-weights-with-wandb-watch).

The rest of the training code remains the same:
we iterate over epochs and batches,
Expand Down
6 changes: 6 additions & 0 deletions models/ref/cli/wandb-login.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,13 @@ wandb login --host https://my-wandb-server.example.com
wandb login --relogin
```

## API key formats

W&B issues API keys in the `wandb_v1_` format (about 92 characters). Older SDK versions expect exactly 40 characters and reject the new format with `API key must be 40 characters long`. Upgrade the SDK (`pip install -U wandb`) and run `wandb login --relogin`.

Keys generated at [wandb.ai/authorize](https://wandb.ai/authorize) are shown only once at creation. Copy them immediately; you cannot retrieve them again after closing the dialog.

For pinned SDK versions, legacy keys, and related errors, see [Why does my API key fail with 'must be 40 characters long'?](/support/models/articles/why-does-my-api-key-fail-with-must-be-40-characters).

## Arguments

Expand Down
2 changes: 2 additions & 0 deletions models/sweeps/signal-handling-sweep-runs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ On preemption, the **training process** must receive the signal, mark the run as

**Multi-agent coordination:** When many agents run at once (such as SLURM array jobs), they can race to claim the same preempted run. This is a known limitation. Stagger agent startup or use external coordination mechanisms like locks to help work around this potential issue.

For multi-GPU SLURM jobs where only one process should call `wandb.agent()`, see [How do I run sweeps with distributed training on SLURM?](/support/models/articles/how-do-i-run-sweeps-with-distributed-training-on-slurm).

## `wandb sweep --cancel`

You cancel a sweep using the W&B API, not an OS signal. Run a command like `wandb sweep --cancel entity/project/sweep_ID`. The server tells the agent to exit, and the agent then terminates running child processes and stops. There can be a short delay (on the order of the agent's API polling interval) before cancellation takes effect.
Expand Down
7 changes: 7 additions & 0 deletions scripts/knowledgebase-nav/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ products:
- Administrator
- Alerts
- Anonymous
- API
- API Keys
- Artifacts
- Authentication
- AWS
- Billing
- Charts
Expand All @@ -51,6 +54,7 @@ products:
- Logs
- Metrics
- Notebooks
- Org Management
- Outage
- Privacy
- Projects
Expand All @@ -59,13 +63,16 @@ products:
- Resuming
- Run Crashes
- Runs
- SDK
- Security
- Storage
- Sweeps
- Tables
- Team Management
- Teams
- Tensorboard
- User Management
- Workspace
- Workspaces
- Wysiwyg

Expand Down
2 changes: 1 addition & 1 deletion snippets/kb_article_map.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ export const kbArticleMap = [
"tags": [
"user management"
],
"title": "How can I log in to W&B Server?"
"title": "How do I log in to W&B Self-Managed?"
},
{
"page": "/models/support/how_can_i_overwrite_the_logs_from_previous_steps",
Expand Down
6 changes: 3 additions & 3 deletions support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ and the W&B community.
<CardGroup cols={3}>
<Card title="W&B Models" href="/support/models" arrow="true" icon="/icons/cropped-models.svg">
{/* AUTO-GENERATED: counts */}
190 articles &middot; 33 tags
210 articles &middot; 40 tags
{/* END AUTO-GENERATED: counts */}
</Card>
<Card title="W&B Weave" href="/support/weave" arrow="true" icon="/icons/cropped-weave.svg">
{/* AUTO-GENERATED: counts */}
16 articles &middot; 8 tags
17 articles &middot; 8 tags
{/* END AUTO-GENERATED: counts */}
</Card>
<Card title="Serverless Inference" href="/support/inference" arrow="true" icon="/icons/cropped-inference.svg">
{/* AUTO-GENERATED: counts */}
7 articles &middot; 5 tags
9 articles &middot; 5 tags
{/* END AUTO-GENERATED: counts */}
</Card>
</CardGroup>
Expand Down
2 changes: 1 addition & 1 deletion support/inference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ template: "scripts/knowledgebase-nav/templates/support_product_index.mdx.j2"
2 articles
</Card>
<Card title="Server Errors" href="/support/inference/tags/server-errors" arrow="true">
2 articles
4 articles
</Card>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "API error code 404 - Model not found"
keywords: ["Server Errors"]
---

A 404 error with the message "Model not found" means the model identifier in your request does not match any model available through the W&B Inference API.

## Why this happens

- **Incorrect model ID**: The model name or path in your request is misspelled or formatted incorrectly.
- **Model is not available on W&B Inference**: Not all models hosted on other providers are available through the W&B Inference API. The model you are requesting may not have been onboarded.
- **Using the wrong base URL**: If you are pointing at a different provider's endpoint but using a W&B API key, the model ID will not resolve correctly.
- **Model was removed**: A model that was previously available may have been deprecated or removed.

## What you can do

1. **Check the model ID**
- Verify the exact model identifier against the [W&B Inference supported models list](/inference/supported-models).
- Model IDs are case-sensitive and typically use the format `provider/model-name` (for example, `meta-llama/Llama-3.3-70B-Instruct`).

2. **Confirm the base URL**
- The W&B Inference base URL is `https://api.wandb.ai/v1`. Ensure your client is pointed at this URL and not another provider's endpoint.

3. **Request access to a new model**
- If the model you need is not currently supported, contact [W&B support](mailto:support@wandb.com) to request it be added.

For more information, see [Serverless Inference](/inference) and the [list models API reference](/inference/api-reference/list-models).

---

{/* AUTO-GENERATED: tab badges */}
<Badge stroke shape="pill" color="orange" size="md">[Server Errors](/support/inference/tags/server-errors)</Badge>
{/* END AUTO-GENERATED: tab badges */}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "API error code 422 - Invalid request parameters"
keywords: ["Server Errors"]
---

A 422 error means the request was understood by the server but could not be processed because one or more parameters are invalid, missing, or out of range.

## Why this happens

- **Unsupported parameter for the model**: Some parameters (such as `frequency_penalty`, `logprobs`, or `response_format`) are not supported by all models. Passing an unsupported parameter returns a 422.
- **Parameter value out of range**: Values like `temperature` must fall within a valid range (typically 0–2). Passing a value outside that range causes a 422.
- **Malformed messages array**: The `messages` field must be a list of objects with `role` and `content` keys. Missing or incorrectly typed fields return a 422.
- **Invalid `response_format`**: Requesting JSON mode (`response_format: {"type": "json_object"}`) with a model that does not support structured outputs causes a 422.

## What you can do

1. **Check the error message body**
- The 422 response body contains a `detail` field that identifies which parameter is invalid and why. Read it before troubleshooting.

2. **Verify parameter support for your model**
- Review the [W&B Inference supported models list](/inference/supported-models) for the specific parameters and ranges each model accepts.

3. **Validate your messages array**
- Each message must have a `role` (`system`, `user`, or `assistant`) and a `content` string. Tool call messages require additional fields—consult the API reference for the correct schema.

4. **Remove unsupported parameters**
- If you are adapting code from another provider, remove any parameters that are not in the W&B Inference API reference. Extra parameters that the model does not support will trigger a 422.

For more information, see [Serverless Inference](/inference) and the [chat completions API reference](/inference/api-reference/chat-completions).

---

{/* AUTO-GENERATED: tab badges */}
<Badge stroke shape="pill" color="orange" size="md">[Server Errors](/support/inference/tags/server-errors)</Badge>
{/* END AUTO-GENERATED: tab badges */}
8 changes: 7 additions & 1 deletion support/inference/tags/server-errors.mdx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
title: "Server Errors"
tag: "2"
tag: "4"
generator: "knowledgebase-nav"
template: "scripts/knowledgebase-nav/templates/support_tag.mdx.j2"
---

<Card title="API error code 404 - Model not found" href="/support/inference/articles/api-error-code-404-model-not-found" arrow="true" horizontal>
A 404 error with the message "Model not found" means the model identifier in your request does not match any model avail ...
</Card>
<Card title="API error code 422 - Invalid request parameters" href="/support/inference/articles/api-error-code-422-invalid-request-parameters" arrow="true" horizontal>
A 422 error means the request was understood by the server but could not be processed because one or more parameters are ...
</Card>
<Card title="API error code 500 - The server had an error while processing your request" href="/support/inference/articles/api-error-code-500-the-server-had-an-err" arrow="true" horizontal>
A 500 error with the message The server had an error while processing your request indicates an internal server error in ...
</Card>
Expand Down
Loading
Loading