Skip to main content
When you run an experiment, you might notice messages printed to your console. W&B captures console logs and displays them in the W&B App. Use these messages to debug and monitor the behavior of your experiment. The following sections describe how to view, configure, search, filter, download, and copy console logs for your runs.

View console logs

Access console logs for a run in the W&B App to inspect messages produced during the run.
  1. Navigate to your project in the W&B App.
  2. Select a run within the Runs table.
  3. Click the Logs tab in the project sidebar.
W&B stores a maximum of 100,000 lines of your logs for a run. In the W&B App, a maximum of 10,000 lines of your logs display at once. To view all stored lines, scroll through the logs to display older lines.

Types of console logs

W&B captures three types of console logs and adds a prefix to indicate each log’s severity. The prefix helps you scan logs and identify the messages most relevant to debugging. The following table summarizes each type, ordered from most to least severe.
SeverityPrefixDescriptionExample
ErrorERRORSerious issues that might prevent the run from completing successfully.ERROR Failed to save notebook.
WarningWARNINGPotential issues that don’t stop execution.WARNING Found .wandb file, not streaming tensorboard metrics.
Infowandb:Updates about the run’s progress and status.wandb: Starting Run: abc123

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 include show_errors, show_warnings, show_info, and silent. The Settings reference lists every parameter and is generated from the SDK, so it stays current as new options are added. 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):
import wandb

settings = wandb.Settings(
    show_errors=True,
    silent=False,
    show_warnings=True,
)

with wandb.init(settings=settings) as run:
    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?.

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 for defaults and behavior when both are 0.
Uploaded chunks are immutable. Terminal control sequences that modify previous lines (for example, progress bars that use carriage returns) only affect the current chunk.
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? and 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.
import wandb

with wandb.init(project="my-project") as run:
    for i in range(100, 1000, 100):
        # Logs to W&B and prints to console
        run.log({"epoch": i, "loss": 0.1 * i})
        print(f"epoch: {i} loss: {0.1 * i}")
The console logs look similar to the following:
1 epoch:  100 loss: 1.3191105127334595
2 epoch:  200 loss: 0.8664389848709106
3 epoch:  300 loss: 0.6157898902893066
4 epoch:  400 loss: 0.4961796700954437
5 epoch:  500 loss: 0.42592573165893555
6 epoch:  600 loss: 0.3771176040172577
7 epoch:  700 loss: 0.3393910825252533
8 epoch:  800 loss: 0.3082585036754608
9 epoch:  900 loss: 0.28154927492141724

Timestamps

W&B automatically adds timestamps to each console log entry. This lets you track when each log message was generated. To show or hide timestamps in the console logs, select the Timestamp visible drop-down list on the console logs page.

Search console logs

To quickly locate relevant entries, use the search bar on the console logs page to filter logs by keywords. You can search for specific terms, labels, or error messages.

Filter with custom labels

Parameters prefixed by x_ (such as x_label) are in public preview. Create a GitHub issue in the W&B repository to provide feedback.
You can filter console logs based on the labels you pass as arguments for x_label in wandb.Settings. Enter the label in the search bar on the console logs page.
import wandb

# Initialize a run in the primary node
with wandb.init(
    entity="[ENTITY-NAME]",
    project="[PROJECT-NAME]",
    settings=wandb.Settings(
        x_label="[CUSTOM-LABEL]"  # (Optional) Custom label for filtering logs
    )
) as run:
    # Your code here

Download console logs

To save logs locally for offline analysis or sharing, download console logs for a run in the W&B App:
  1. Navigate to your project in the W&B App.
  2. Select a run within the Runs table.
  3. Click the Logs tab in the project sidebar.
  4. Click the download button on the console logs page.

Copy console logs

To paste logs into another tool or message, copy console logs for a run in the W&B App:
  1. Navigate to your project in the W&B App.
  2. Select a run within the Runs table.
  3. Click the Logs tab in the project sidebar.
  4. Click the copy button on the console logs page.