Skip to main content
If metrics logged with wandb.log() are not appearing in the W&B UI, there are several common causes. Offline mode without syncing If WANDB_MODE=offline is set, metrics are saved locally but not uploaded until you run wandb sync. Check whether the run shows data locally in your wandb/ directory and sync it. Replace [TIMESTAMP] and [ID] with your run’s timestamp and ID:
wandb sync wandb/run-[TIMESTAMP]-[ID]
Uncoordinated logging in distributed training In distributed training, a common pattern is to log from a single process only (typically rank 0). If multiple processes log to the same run without coordination, metrics can overwrite each other or drop. Use a rank check to log from one process:
import os
import wandb

with wandb.init(project="[YOUR-PROJECT]") as run:
    if int(os.environ.get("RANK", 0)) == 0:
        loss = ...  # your computed metric
        run.log({"loss": loss})
W&B also supports logging to a single run from multiple processes in a coordinated way using shared mode. See that guide for both the rank-0 and multi-process patterns. For offline sync, see Environment variables.
Logs Metrics Experiments