Expand description
Runtime execution: schedulers, controllers, stores, OOF/merge logic.
Split from the former monolithic runtime.rs into cohesive submodules
(pure refactor — code moved verbatim). mod.rs owns the run context,
the controller registry, the custom-aggregation dispatch entry points,
native variant selection, and re-exports the full runtime surface so
pub use runtime::* in lib.rs resolves identically.
Structs§
- Artifact
Handle Record - Artifact
Input Spec - Artifact
Materialization Request - Artifact
Payload Materialization Record - Artifact
Ref - Bundle
Replay Execution - Columnar
Prediction Cache Block - Columnar
Prediction Cache Manifest - Columnar
Prediction Cache Store - Data
Materialization Request - Data
Output Provenance - Data
Provider View Spec - Data
View Request - Envelope
Attested Runtime Data Provider - Owns a host data provider while supplying envelope-backed identities at the runtime trust boundary. A complete training identity is available only when the envelope carries feature, target and relation fingerprints.
- Explanation
Block - An EXPLAIN-phase output block (ADR-12 explain contract). Explanations are a
node output returned in the
NodeResult— like predictions, they cross as data, not as an opaque host handle. Thepayloadshape is controller-defined (e.g. per-feature importances); the core does not interpret it. Explanations are only valid in theEXPLAINphase. - File
Artifact Manifest - Versioned, file-backed artifact manifest. This is a manifest/portability
layer only: it records portable
ArtifactRefmetadata for a bundle’s refit artifacts. It does not deserialize ML objects or materialize artifact payloads; payload stores remain future work. - File
Artifact Manifest Entry - One persisted artifact entry. Mirrors the bundle
RefitArtifactRecordidentity (node, controller, artifact, parameters and training loss) while requiring theArtifactRefto be portable so the manifest stays movable with its payloads. - File
Artifact Manifest Store - File-backed artifact manifest store rooted at a directory.
- File
Artifact Payload Store - File
Prediction Cache Entry - File
Prediction Cache Manifest - File
Prediction Cache Store - FitInfluence
Diagnostic - FitInfluence
Task - Handle
Ref - InMemory
Aggregated Prediction Store - InMemory
Artifact Store - InMemory
Lineage Recorder - InMemory
Prediction Cache Store - InMemory
Prediction Store - Lineage
Record - Methods
PlsData - Provider response for one PLS fit/predict invocation.
- Methods
PlsData Request - Scheduler-owned view selection for a portable Methods PLS operation.
- Methods
PlsDataset - One identity-keyed dataset returned by the portable PLS provider capability.
- Methods
PlsMatrix - Row-major
f64matrix passed from an explicitly capable provider to the portable Methods PLS controller. It never crosses the public ABI. - Methods
PlsPredict Data Provider - Native, in-memory data provider for target-free Methods PLS PREDICT.
- Methods
PlsPredict Input - Node
Result - Node
Task - Parallel
Scheduler - Prediction
Cache Materialization Record - Prediction
Cache Materialization Request - Prediction
Input Spec - RunContext
- Runtime
Controller Registry - Runtime
HpoCampaign Result - Runtime
HpoCampaign Task - Typed scheduler operation used to create one invocation-local HPO session.
It deliberately contains no graph
NodePlan: the session controls variant campaigns fortarget_node_id, while all predictor work remains in the ordinary graph execution plan. - Runtime
HpoCandidate Evaluation - Scheduler-owned evidence retained for a successfully completed trial. Candidate OOF data remains report-only and is never reused as a training input; final SELECT/REFIT is intentionally outside this campaign call.
- Runtime
HpoCheckpoint Result - Durable native optimizer state paired with exact coordinator evidence. No native Context or Optimizer object crosses this boundary.
- Runtime
HpoCompleted Report - The one cross-fold OOF report which terminalized a completed native trial. Keeping the native trial id beside report-grade scheduler evidence makes a checkpoint resumable without asking libn4m to invent coordinator scores.
- Runtime
HpoExecution Context - Immutable coordinator evidence for one execution-local HPO campaign.
- Runtime
HpoFailure - Runtime
HpoIncumbent - One typed native incumbent, derived from the optimizer’s
best()only after every scheduler-observed proposal has reached a terminal state. - Runtime
HpoIntermediate - Runtime
HpoProposal - One candidate proposed by a local tuner session. It contains a normal plan variant only; no native optimizer/context can cross the scheduler boundary.
- Runtime
HpoProvenance - Runtime
HpoSelection Target - Runtime
HpoTerminal Snapshot - A controller-attested terminal native trial. The native record is never reconstructed from checkpoint bytes by DAG-ML; it is obtained only from the invocation-local session which owns that checkpoint.
- Sequential
Scheduler - Variant
Execution Spec - Variant
Selection - Outcome of native variant selection: the winning variant plus EVERY scored variant’s
cross-validation reports, each tagged with its own
variant_id. - Variant
Selection Outcome - Extended result of native variant selection.
- Variant
Validation Predictions - One scored variant’s VALIDATION (OOF) predictions, captured from its transient FIT_CV
RunContextand re-tagged with the variant’s id + content fingerprint so a host can fill that variant’s per-sample prediction rows. REPORT-grade output paired withVariantSelection::validation_reports: it never feeds a training/feature path (see the field docs onVariantSelection::variant_validation_predictions).
Enums§
Constants§
- DATA_
OUTPUT_ PROVENANCE_ KEY - DATA_
OUTPUT_ PROVENANCE_ SCHEMA_ ID - DATA_
OUTPUT_ PROVENANCE_ SCHEMA_ VERSION - FILE_
ARTIFACT_ MANIFEST_ FILE - FILE_
ARTIFACT_ MANIFEST_ SCHEMA_ VERSION - FILE_
PREDICTION_ CACHE_ MANIFEST_ FILE - FILE_
PREDICTION_ CACHE_ STORE_ SCHEMA_ VERSION - METHODS_
PLS_ PREDICT_ CONTENT_ PROFILE - One host-materialized X-only cohort offered to the native Methods PLS controller for a fresh PREDICT replay.
- NODE_
RESULT_ SCHEMA_ ID - NODE_
RESULT_ SCHEMA_ VERSION - NODE_
TASK_ SCHEMA_ ID - NODE_
TASK_ SCHEMA_ VERSION
Traits§
- Runtime
Artifact Store - Runtime
Controller - Runtime
Data Provider - Runtime
Prediction Cache Store - Runtime
Tuner Session - Per-campaign tuner state. Deliberately no
SendorSyncsupertrait: libn4m’s Context and Optimizer are thread-affine. The session proposes a portable variant; the scheduler evaluates its FIT_CV/OOF evidence and feeds the scalar intermediate/terminal state back here. This avoids a controller-owned CV loop and prevents native state from entering aSendscheduler worker or registry.
Functions§
- dispatch_
custom_ aggregation_ task - dispatch_
custom_ observation_ aggregation - dispatch_
custom_ sample_ aggregation - methods_
pls_ predict_ feature_ content_ fingerprint - Compute the published X-only content identity for a Methods PLS cohort.
- plan_
oof_ partition_ mode - The OOF
FoldPartitionModefor a plan: its fold set’s mode, orPartition(the clean-OOF default) when the plan carries no fold set. Used to make the cross-fold scoring gate mode-aware soResampled(ShuffleSplit / repeated CV) campaigns, where a sample is validated in several folds, are not rejected by thePartitionexactly-once uniqueness rule. - refit_
artifact_ input_ key - select_
best_ operator_ variant_ by_ cv - Pick the best OPERATOR variant of an operator-generator UNION plan by its cross-validation score.
- select_
best_ operator_ variant_ from_ models - Route operator-SELECT from the operator-variant models lowered off a pipeline DSL
(
compile_operator_variant_models). - select_
best_ variant_ by_ cv - Pick the best variant of a multi-variant plan by its cross-validation score, natively.
- select_
best_ variant_ outcome_ by_ cv - Select the best plan variant and retain the exact decision produced by the shared native ranking pass.
- select_
best_ variant_ outcome_ by_ cv_ for_ target - Select a plan variant using only the cross-fold OOF average emitted by one explicitly resolved score-target producer. All producers’ validation reports remain retained in the returned outcome for audit.