Available data types
Examples
This example uses anImage:
Table to log a table with mixed text and labels:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Help us improve these docs. Take our quick survey.
Data Types in the W&B Python SDK for logging media and structured data
| Data Type | Description |
|---|---|
Image | Log images with support for masks, bounding boxes, and segmentation. |
Video | Track video data for model outputs or dataset samples. |
Audio | Log audio samples for audio processing tasks. |
Table | Create tables that can contain mixed media types. |
Plotly | Log Plotly charts for data visualization. |
Html | Embed custom HTML content. |
Object3D | Visualize 3D point clouds and meshes. |
Molecule | Log molecular structures for computational chemistry. |
Image:
import wandb
import matplotlib.pyplot as plt
# Generate an image for demonstration purposes
path_to_img = "/path/to/cafe.png"
im = plt.imread(path_to_img)
# Initialize a new run
with wandb.init(project="awesome-project") as run:
# Log the image
run.log({"img": [wandb.Image(im, caption="Cafe")]})
Table to log a table with mixed text and labels:
import wandb
# Initialize a new run
with wandb.init(project="visualize-predictions", name="tables") as run:
# Create tabular data, using a list of lists
data = [["Cat", "1", "1"],["Dog", "0", "-1"]]
run.log({"Table 1": wandb.Table(data=data, columns=["Text", "Predicted Label", "True Label"])})
# Create tabular data, using `wandb.Table.add_data()` method
table = wandb.Table(columns=["Text", "Predicted Label", "True Label"])
table.add_data("Cat", "1", "1")
table.add_data("Dog", "0", "-1")
run.log({"Table 2": table})
Was this page helpful?