Tasks#
Task loader reads task.toml + instruction.md and produces Inspect AI Task objects.
inspect_coco.tasks.loader
#
Task loader — reads task.toml + instruction.md and produces Inspect Tasks.
IDDThresholdError
#
Bases: Exception
Raised when instruction IDD score is below threshold in strict mode.
coco_task(task_dir, timeout_sec=900, epochs=None, idd_threshold=None, idd_strict=False)
#
Load a CoCo eval task from a task.toml directory.
Reads task configuration, instruction, and test script. Runs IDD pre-check on the instruction and configures the Inspect Task with auto-epochs for consistency measurement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task_dir
|
str
|
Path to directory containing task.toml + instruction.md. |
required |
timeout_sec
|
int
|
Default agent timeout (overridden by task.toml). |
900
|
epochs
|
int | None
|
Number of epochs for pass@k (default: 3, overridden by task.toml). |
None
|
idd_threshold
|
float | None
|
IDD score threshold (default: 0.6, overridden by task.toml). |
None
|
idd_strict
|
bool
|
If True, fail below threshold instead of warning. |
False
|