Function signature
Parameters
str
required
Name of the run to evaluate. Corresponds to the run name used in
run().str | None
default:"None"
Filter evaluation to a specific subset (e.g.,
"lite").str | None
default:"None"
Filter by repository name (e.g.,
"llama_index_task").int | None
default:"None"
Filter to a specific task ID.
list[int] | None
default:"None"
Specific feature pair to evaluate (e.g.,
[1, 2]).int
default:"10"
Number of parallel evaluations to run.
bool
default:"False"
If
True, re-evaluates even if eval.json already exists.str
default:"modal"
Evaluation backend:
"modal", "docker", or "gcp".Basic usage
Evaluate all runs
Evaluate a subset
Evaluate specific tasks
Advanced usage
Force re-evaluation
Use different backend
High-concurrency evaluation
How evaluation works
Cooperative mode
For cooperative runs, evaluation:- Merges patches from both agents (
agent1.patch+agent2.patch) - Applies the merged patch to the repository
- Applies feature 1 tests and runs them
- Applies feature 2 tests and runs them
- Reports whether both feature tests pass
Solo mode
For solo runs, evaluation:- Applies the single agent’s patch (
solo.patch) - Applies feature 1 tests and runs them
- Applies feature 2 tests and runs them
- Reports whether both feature tests pass
Evaluation results
Results are saved tologs/{run_name}/{setting}/{repo}/{task_id}/{features}/eval.json:
Result fields
str
Repository name
int
Task identifier
list[int]
Feature pair that was tested
str
Execution mode (
"coop" or "solo")object | null
Merge information (cooperative mode only):
status:"success","conflict", or"failed"strategy: Git merge strategy used
object
Feature 1 test results:
passed: Whether all tests passedtests_passed: Number of passing teststests_failed: Number of failing teststest_output: Full test output
object
Feature 2 test results (same structure as
feature1)bool
True if both feature tests passedstr | null
Error message if evaluation failed
str
ISO timestamp of evaluation
Summary output
A summary is also saved tologs/{run_name}/eval_summary.json:
Related functions
- run() - Execute benchmark tasks
- discover_runs() - Query completed runs
- test_merged() - Low-level patch testing (cooperative)
- test_solo() - Low-level patch testing (solo)
- evaluate_merge() - Training-compatible wrapper for test_merged()
Low-level testing functions
test_merged()
Test merged patches from two agents (cooperative mode).Parameters
str
required
Repository name
int
required
Task ID
int
required
First feature ID
int
required
Second feature ID
str | Path | None
default:"None"
First agent’s patch (as string or path to .patch file)
str | Path | None
default:"None"
Second agent’s patch (as string or path to .patch file)
int
default:"600"
Maximum execution time in seconds
str
default:"modal"
Evaluation backend
test_solo()
Test a single patch against both feature tests (solo mode).test_merged() except only one patch parameter is used.
run_patch_test()
Test a patch against a single feature’s tests.Parameters
str
required
Repository name
int
required
Task ID
int
required
Feature ID to test
str | Path | None
default:"None"
Agent’s patch (as string or path). If
None, uses gold patch from dataset.int
default:"600"
Maximum execution time in seconds
str
default:"modal"
Evaluation backend
evaluate_merge()
Wrapper fortest_merged() that returns results in a format compatible with training code.
Parameters
Parameters are identical totest_merged().
Returns
Returns a dictionary with the following keys:int
Number of tests passed for feature 1
int
Total number of tests for feature 1
int
Number of tests passed for feature 2
int
Total number of tests for feature 2
str | None
Error message if evaluation failed, None otherwise
This function is primarily used for training and benchmarking workflows that require a specific result format.