- Studio
- Observability
- Offline evaluations
- Advanced guides
Iterate locally
Iterate locally
Run evaluations with local=True to skip uploading results to Studio during development.
Set local=True to run evaluations without uploading results to Studio. This is useful for fast iteration during development.
Usage
run = await client.evaluation.run(
dataset=dataset,
task=task,
evaluators=[Evaluator(name="accuracy", scorer=scorer)],
local=True,
)
run.show(level="records")
In local mode:
- No data is sent to Studio.
- You don't need to specify a project or evaluation.
- Omitting evaluation also keeps the run local, even without local=True.
- Results stay in memory: read them from the returned run, print them with run.show(), or export them as JSON.
Local mode works for every organization, including those that aren't Enterprise organizations. Pass the dataset as a list of records: a Studio Dataset and a deployed agent are read from Studio, which is available to Enterprise organizations only.
Recommended workflow
1.
Iterate locally: set local=True and adjust your task and scorers until results look right.2.
Push to Studio: remove local=True (or set local=False) and add project and evaluation to track results over time.
# Step 1: iterate locally
run = await client.evaluation.run(
dataset=dataset,
task=task,
evaluators=[Evaluator(name="accuracy", scorer=scorer)],
local=True,
)
# Step 2: happy with results, push to Studio
run = await client.evaluation.run(
project=Project(name="My Project"),
evaluation=Evaluation(name="My Eval"),
dataset=dataset,
task=task,
evaluators=[Evaluator(name="accuracy", scorer=scorer)],
)
JSON export
Export results as JSON for further processing:
run.show(mode="json", level="records")