score_composition#
Compose complete block metrics from isolated subblock measurements.
Classes
Functions
Compose every canonical full block from isolated component deltas. |
|
Convert a composed table to the established multi-layer MIP schema. |
- class ComposedScoreRecord#
Bases:
object- __init__(solution_index, layer_idx, block_config, metrics, provenance, source_result_ids)#
- Parameters:
solution_index (int)
layer_idx (int)
block_config (BlockConfig)
metrics (Mapping[str, float])
provenance (str)
source_result_ids (tuple[str, ...])
- Return type:
None
- block_config: BlockConfig#
- layer_idx: int#
- metrics: Mapping[str, float]#
- provenance: str#
- solution_index: int#
- source_result_ids: tuple[str, ...]#
- class ComposedScoreTable#
Bases:
object- __init__(records)#
- Parameters:
records (tuple[ComposedScoreRecord, ...])
- Return type:
None
- records: tuple[ComposedScoreRecord, ...]#
- compose_full_block_metrics(canonical_solutions, subblock_results, *, teacher_blocks, teacher_baseline, exact_results=())#
Compose every canonical full block from isolated component deltas.
Exact full-block measurements, when supplied, take precedence over additive estimates for the same semantic block identity.
- Parameters:
canonical_solutions (Iterable[Mapping[str, Any]])
subblock_results (Iterable[Mapping[str, Any]])
teacher_blocks (Sequence[BlockConfig])
teacher_baseline (Mapping[str, float])
exact_results (Iterable[Mapping[str, Any]])
- Return type:
- composed_table_to_gathered_metrics(table, canonical_solutions, teacher_records)#
Convert a composed table to the established multi-layer MIP schema.
- Parameters:
table (ComposedScoreTable)
canonical_solutions (Sequence[Mapping[str, Any]])
teacher_records (Sequence[dict[str, Any]])
- Return type:
dict[str, dict[str, Any]]