> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Why are my metrics missing from wandb.log()?

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:

```bash theme={null}
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:

```python theme={null}
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](/models/track/log/distributed-training). See that guide for both the rank-0 and multi-process patterns.

For offline sync, see [Environment variables](/models/track/environment-variables).

***

<Badge stroke shape="pill" color="orange" size="md">[Logs](/support/models/tags/logs)</Badge><Badge stroke shape="pill" color="orange" size="md">[Metrics](/support/models/tags/metrics)</Badge><Badge stroke shape="pill" color="orange" size="md">[Experiments](/support/models/tags/experiments)</Badge>
