orchestrator¶
This module contains the main user-facing entry points for running evaluations.
evaluate(predicted_records, gold_records, run_config)¶
Purpose:
- choose the correct evaluator class from
run_config.task_type - run the evaluation
- return a
ResultBundle
Parameters:
predicted_records: list of Pydantic models representing predictionsgold_records: list of Pydantic models representing gold datarun_config:RunConfigcontrolling task type and comparison behavior
Returns:
ResultBundle
Error conditions:
- unsupported
task_typeraisesValueError - indexed task types raise
ValueErrorifindex_key_nameis missing - single-feature evaluation raises
ValueErrorif more than one feature rule is supplied
Side effects:
- none
build_run_context(run_config)¶
Purpose:
- create a
RunContextfor logging and traceability
Returns:
RunContextcontaining a run identifier, start timestamp, and configuration hash
Side effects:
- none
Generated API details¶
build_run_context(run_config)
¶
Create a run context with identifier, timestamp, and config hash.
Source code in src/extraction_testing/orchestrator.py
27 28 29 30 31 32 | |
evaluate(predicted_records, gold_records, run_config)
¶
Convenience entry point to evaluate based on task type.
Source code in src/extraction_testing/orchestrator.py
35 36 37 38 39 40 41 42 43 44 45 | |