nirs4all.pipeline.dagml.fixed_cohort_views module

Attest fixed IO cohort tables through the native data-view callback protocol.

This provider selects existing rows; it never generates data. Each receipt is issued after reading its actual named source buffer and rechecked before use.

class nirs4all.pipeline.dagml.fixed_cohort_views.FixedCohortTaskViews(store: FixedCohortViewStore, task: dict[str, Any])[source]

Bases: GeneratedTaskViews

Reuse native task/receipt validation and reads ledger for fixed tables.

consumed_data_views() → dict[str, dict[str, Any]][source]

Reattest the fixed buffers before reporting successful model reads.

feature_blocks(input_name: str, partition: str, sample_ids: list[str], *, source_names: tuple[str, ...] | None = None) → dict[str, Any][source]

Read the complete ordered single-source buffer attached to this port.

take(input_name: str, partition: str, sample_ids: list[str]) → Any[source]

Return typed IO rows from one named view, preserving requested order.

A subset is allowed because a controller may read a source’s present rows only. The full native view is reattested on every read, including after the task was bound. Mixed train/validation reads must call this method separately for each partition before assembling their outputs.

class nirs4all.pipeline.dagml.fixed_cohort_views.FixedCohortViewStore(resolver: MaterializationResolver, model_input: dict[str, Any], envelope: dict[str, Any])[source]

Bases: object

Retain real source tables behind native handles for one fixed-cohort run.

__call__(call: dict[str, Any]) → dict[str, Any][source]

Materialize a scheduler-selected source before emitting its receipt.

bind_task(task: dict[str, Any]) → FixedCohortTaskViews[source]

Validate every native receipt before the scientific callback runs.