Skip to main content

eligibility_metrics

Eligibility metrics for one completed trial run.

One event covers a whole run, so unlike the task run reporter this has a single method and nothing to coalesce. Like the other reporters it never raises: a summary that cannot be reported must not fail the run that produced it.

A run's reporter is injected into the step that reports it as a runtime param, beside scan_coverage_probe, rather than being carried on the run context: it reports on a run without determining its results, and only one step uses it.

Classes​

EligibilityMetricsEventReporter​

class EligibilityMetricsEventReporter(    sender: ProgressEventSender | None,    *,    project_id: str,    task_run_id: str,    dataset_id: str = '',    dataset_owner_id: str = '',):

Reports the eligibility summary of one task run.

Arguments

  • sender: Delivers the events. None makes the reporter a no-op.
  • project_id: The project the run belongs to.
  • task_run_id: The UUIDv7 identifying this task run, from uuid6.uuid7().
  • dataset_id: The dataset the run processed, when the caller knows it. Left empty by a caller reporting through its pod, which stamps it from the grant instead.
  • dataset_owner_id: The username of the dataset's owner, left empty on the same basis.

Ancestors​

Variables​

  • next_sequence_number : int - The sequence number the next event will carry.
  • sender : ProgressEventSender | None - The sender this reporter hands its events to, if any.

    Read-only: a caller composing a second reporter for the same run shares this one rather than holding the sender separately.

Methods​


summary​

def summary(self, summary: EligibilitySummary) ‑> None:

Report the run's eligibility summary.

Arguments

  • summary: The run's own counts, the deduplicated cohort totals, whether this run's cutover was withheld, and the coverage its verdicts resolved.