Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-style-guide-support-models-articles-20260527-00.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
You can log a list of values, such as per-step losses, with wandb.Run.log(). The following examples show two common approaches: log the list as a dictionary entry, or log it as a histogram to visualize its distribution.
As a dictionary
As a histogram
import wandb
# Initialize a new run
with wandb.init(project="log-list-values", name="log-dict") as run:
# Log losses as a dictionary
losses = [0.1, 0.2, 0.3, 0.4, 0.5]
run.log({"losses": losses})
run.log({f"losses/loss-{ii}": loss for ii, loss in enumerate(losses)})
import wandb
# Initialize a new run
with wandb.init(project="log-list-values", name="log-hist") as run:
# Log losses as a histogram
losses = [0.1, 0.2, 0.3, 0.4, 0.5]
run.log({"losses": wandb.Histogram(losses)})
For more information, see Log objects and media.
Logs
Experiments