Skip to main content
Create an Eval Table using the W&B Python SDK, or convert an existing W&B Table with ARIA.

Create an eval table

Use wandb.EvalTable class to create an Eval Table. For example, suppose you have the following pandas DataFrame:
import pandas as pd
import wandb

df = pd.DataFrame(
    [
        {
            "image_id": "img_001",
            "true_label": "cat",
            "predicted_label": "cat",
            "confidence": 0.97,
            "correct": True,
        },
        {
            "image_id": "img_002",
            "true_label": "dog",
            "predicted_label": "cat",
            "confidence": 0.72,
            "correct": False,
        },
        {
            "image_id": "img_003",
            "true_label": "car",
            "predicted_label": "car",
            "confidence": 0.89,
            "correct": True,
        },
    ]
)
Create an Eval Table by passing the DataFrame to wandb.EvalTable. Use the input_columns, output_columns, and score_columns arguments to identify the role of each column. The following example uses:
  • image_id as the input
  • predicted_label as the output
  • correct and confidence as scores
with wandb.init(project="classifier-eval-table-demo") as run:
    eval_table = wandb.EvalTable(
        dataframe=df,
        input_columns=["image_id"],
        output_columns=["predicted_label"],
        score_columns=["correct", "confidence"],
    )
    run.log({"validation_predictions_eval": eval_table})    

Convert a W&B Table to an Eval Table

Use ARIA to convert an existing W&B Table to an Eval Table:
  1. Navigate to the project that contains the W&B Table.
  2. Select the blue circle in the upper-right corner of the page to open ARIA.
  3. Enter /convert-eval-table in the ARIA conversation.
  4. Select Send, represented by the upward-pointing arrow in the lower-right corner of the conversation.
Converting a W&B Table does not modify the original table.