For the complete documentation index, see llms.txt. This page is also available as Markdown.

Evaluations

client.evaluations — create benchmark and dataset evaluations, wait for completion, list, retrieve results.

Create

The canonical pattern is to fetch model and benchmark objects first, then pass them to create (not just IDs):

from layerlens import Stratix

client = Stratix()

# Fetch the objects you want to evaluate
model = client.models.get_by_key("openai/gpt-4o")
benchmark = client.benchmarks.get_by_key("arc-agi-2")

# Create the evaluation
evaluation = client.evaluations.create(
 model=model,
 benchmark=benchmark,
)
print(f"Created evaluation {evaluation.id}, status={evaluation.status}")

get_by_key is case-sensitive. Alternatively, fetch a list and pick:

models = client.models.get(type="public", name="gpt-4o")
model = models[0]

Wait for completion

Pass the evaluation object (not just the ID) to wait_for_completion:

Once the evaluation completes, retrieve results:

The Evaluation object exposes .is_success, .status, .id, and other fields directly.

List and filter

Async

Every method has an awaitable counterpart on AsyncStratix:

For concurrent runs, see samples/core/async_workflow.py.

Result fields

The result object exposes:

  • accuracy — overall accuracy for benchmark-style evaluations

  • status"queued", "running", "completed", "failed", "cancelled"

  • is_success — boolean shortcut for status == "completed"

  • id — stable evaluation ID

For per-row data and detailed scores, retrieve via client.results.get(evaluation=evaluation).

Compare

Source samples

Sample
What it shows

samples/core/quickstart.py

Minimal end-to-end

samples/core/run_evaluation.py

Full evaluation lifecycle

samples/core/benchmark_evaluation.py

Model vs. benchmark

samples/core/async_workflow.py

Concurrent evaluations

samples/core/evaluation_filtering.py

Filter and paginate

samples/core/compare_evaluations.py

Compare runs

samples/core/evaluation_pipeline.py

Chain judges + traces + results

See also

Last updated

Was this helpful?