Skip to main content
The cases= argument on @eval lets you generate multiple evaluations from one function.

Basic Usage

This generates three evaluations with numeric IDs:
  • test_addition[0]
  • test_addition[1]
  • test_addition[2]
Without custom IDs, test variants are numbered sequentially. Provide IDs for readable names.

Case Shape

cases must be a list of dicts. Each dict can override any @eval argument plus an id:

Per-Case Overrides

Case dicts can override:
  • input, reference, metadata, dataset, labels, default_score_key
  • timeout, target, evaluators
  • id (for naming)
Rules:
  • If a key is omitted, the decorator default is used.
  • If a key is present with None, it clears the default.
  • labels merge with the default (duplicates removed); labels: None clears.
  • metadata merges (case wins).

Custom IDs

Generates:
  • test_thresholds[low]
  • test_thresholds[mid]
  • test_thresholds[high]

Explicit Grids

You can build explicit grids using list comprehensions:

Running Specific Variants