Skip to main content

Crate dag_ml

Crate dag_ml 

Source
Expand description

Public Rust facade for DAG-ML.

Modules§

aggregation
archive_workspace
Archive V2 replay-member assembly owned by DAG-ML.
bundle
campaign
canonical
DAG-ML Typed Canonical Value v1 (TCV1).
chain_effect
Chain-effect analysis contract + per-dataset score normalization.
conformal
Native split-conformal regression kernels.
conformal_runtime
Durable, identity-keyed wiring for the native split-conformal kernel.
controller
controller_adapter
Mechanical derivation of ControllerManifests from a thin host-controller descriptor — the dag-ml side of the OperatorController -> ControllerManifest adapter (DEC-CTRL-001 / the “B1” adapter).
controller_registry
Loader for declarative *.controller.yaml registries.
criteria
Backend-neutral training-loss and metric semantic contracts.
data
dsl
Pipeline DSL: parse, validate, and compile the declarative pipeline spec into a GraphSpec / CompiledPipelineDsl.
error
fold
generation
graph
hpo
Native Methods HPO controller.
ids
implementation_registry
Process-local executable implementation registry.
metric_provider
Typed metric-provider dispatch shared by native and binding-local implementations.
metrics
observability
ADR-12 observability hooks.
oof
phase
plan
policy
provenance
relation
replay
Public training replay contracts.
rng
runtime
Runtime execution: schedulers, controllers, stores, OOF/merge logic.
selection
training
Frozen W1 training and portable-predictor contracts.
training_runtime
Native training orchestration outcome and common runtime entry point.

Structs§

AggregateRepresentation
AggregatedPredictionBlock
AggregationControllerResult
AggregationControllerSpec
AggregationControllerTask
AggregationPolicy
ArchiveV2ReplayPayloads
Exact bytes and manifest handed to the Core Archive V2 writer.
ArtifactHandleRecord
ArtifactId
ArtifactInputSpec
ArtifactMaterializationRequest
ArtifactPayloadMaterializationRecord
ArtifactRef
AttachedTrainingReplayInput
AugmentationPolicy
BoundTrainingOutput
One resolved output binding and the actual portable blocks it selected.
BranchId
BranchViewPlan
BundleDataRequirement
BundleId
BundlePredictionBlockCacheRecord
BundlePredictionCachePayload
BundlePredictionCachePayloadSet
BundlePredictionCacheRecord
BundlePredictionRequirement
BundleReplayExecution
CacheNamespace
Candidate-cache identity. Every field that can change predictions is part of the TCV1 namespace; a requirement key alone is deliberately insufficient.
CampaignFingerprintSpec
CampaignSpec
CandidateScore
CartesianProductRepresentation
ChainEffectAnalysis
The serialized chain-effect analysis artifact.
ChainEffectMetric
The metric the scores are expressed in, plus its optimization direction.
ChainEffectPoint
One chain projected to a comparable goodness (higher = better).
ChainEffectStep
One node occurrence inside a chain.
ChainObservation
Host-supplied observation: one executed chain with a comparable score.
ChoiceRef
A reference to a single dimension choice — dimension is a GenerationDimension::name and label a GenerationChoice::label within it. Generation constraints are expressed as sets of these refs; a variant “contains” the ref when its selected choice for dimension carries label.
ColumnarPredictionCacheBlock
ColumnarPredictionCacheManifest
ColumnarPredictionCacheStore
CombinationPlan
CompiledPipelineDsl
ConformalCalibration
Closed, self-fingerprinted split-conformal state retained beside a bundle. sample_ids is the calibration order, not an interchangeable set: this makes accidental positional joins fail before residuals are calculated.
ConformalCalibrationCohort
Relation-derived calibration cohort. Physical and origin identities are both retained so a relation-expanded training cohort cannot be bypassed by presenting only one namespace. The attachment boundary derives and checks these fields from an authoritative crate::relation::SampleRelationSet.
ConformalCalibrationContext
Complete, canonical provenance closure supplied by the replay boundary. These are not optional hints: attached calibration checks every member against the exact source outcome and replay before it is persisted.
ConformalCalibrationRef
Typed reference retained by portable execution bundles. It contains no host object or duplicate algorithm state; the complete state stays in the matching TrainingOutcome.
ConformalCalibrationTruth
Truth supplied by the data layer for a calibration replay. It carries the same stable physical sample ids as the point block so a host can never smuggle a positional y_true matrix across a reordered replay.
ConformalIntervalBlock
Identity-preserving interval result for one replayed point block.
ControllerId
ControllerInfluenceRequirement
ControllerManifest
ControllerRegistry
CrossFoldValidation
The output of cross_fold_validation_reports: the scalar cross-fold OOF average reports (one per producer, fold_id = "avg") plus — purely additively — the per-sample OOF average block + y_true each report was computed from. reports is byte-identical to the historical Vec return; callers that only need the scalars read reports and ignore oof_averages.
DagMlErrorDescriptor
A stable ADR-11 error payload that can be serialized across bindings.
DataBinding
DataHandleRecord
DataMaterializationRequest
DataModelShapePlan
DataOutputProvenance
DataPlan
DataPlanStep
DataProviderViewSpec
DataViewHandleRecord
DataViewPolicy
DataViewRequest
DataViewSelector
EarlyStoppingRecord
Controller-reported early-stopping outcome, kept separate from persisted OOF/reporting scores and bound to one exact metric role and task scope.
EdgeContract
EdgeSpec
EnvelopeAttestedRuntimeDataProvider
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.
EvaluationResult
ExecutionBundle
ExecutionPlan
ExecutionScopePlan
ExplanationBlock
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. The payload shape is controller-defined (e.g. per-feature importances); the core does not interpret it. Explanations are only valid in the EXPLAIN phase.
ExternalDataPlanEnvelope
FeatureSelectionPolicy
FileArtifactManifest
Versioned, file-backed artifact manifest. This is a manifest/portability layer only: it records portable ArtifactRef metadata for a bundle’s refit artifacts. It does not deserialize ML objects or materialize artifact payloads; payload stores remain future work.
FileArtifactManifestEntry
One persisted artifact entry. Mirrors the bundle RefitArtifactRecord identity (node, controller, artifact, parameters and training loss) while requiring the ArtifactRef to be portable so the manifest stays movable with its payloads.
FileArtifactManifestStore
File-backed artifact manifest store rooted at a directory.
FileArtifactPayloadStore
FilePredictionCacheEntry
FilePredictionCacheManifest
FilePredictionCacheStore
FitInfluenceDiagnostic
FitInfluenceTask
FoldAssignment
FoldId
FoldSet
GenerationChoice
GenerationConstraints
Declarative pruning constraints applied to the enumerated variant set BEFORE materialization.
GenerationDimension
GenerationParamOverride
GenerationSpec
GraphInterface
GraphPlan
GraphSpec
GroupId
GroupKFoldSpec
HandleRef
HostControllerSpec
Host-side description of one OperatorController, the input from which a validated ControllerManifest is mechanically derived.
HpoBatch
HpoBestTrial
The native optimizer’s incumbent, retaining the score returned by its best call rather than re-deriving it from a lossy projection.
HpoEvaluationBoundary
Explicit evaluator boundary. It exposes DAG-ML’s real ownership primitives, not marker enums; the optimizer cannot manufacture folds, scores, lineage, a selection decision, or a refit. Native finetuning remains selection-only.
HpoFailure
HpoIntermediate
HpoNativeError
Native error data is retained verbatim enough for policy/retry decisions; never flatten it into an opaque display string.
HpoOptimizerConfig
HpoSearchSpace
HpoStudyBinding
HpoTrial
HpoTrialParameter
ImplementationDescriptor
InMemoryAggregatedPredictionStore
InMemoryArtifactStore
InMemoryDataProvider
InMemoryLineageRecorder
InMemoryPredictionCacheStore
InMemoryPredictionStore
KFoldSpec
LeakageUnitPolicy
LineageId
LineageRecord
LoadedPredictor
Process-local sidecar. It deliberately implements neither Serialize nor Deserialize, so opaque host objects cannot leak into portable packages.
LoadedPredictorReplayInput
LocalImplementationRegistry
Generic process-local registry keyed by a validated implementation descriptor.
LossExecutionAttestation
LossReference
LossResolutionRequest
LossSpec
ManifestKindTemplate
The mechanical, per-NodeKind portion of a ControllerManifest: the fields a host does not need to author because they follow deterministically from the node kind. HostControllerSpec::derive composes one of these with the host-supplied identity/selectors/overrides.
MethodsHpoCandidateEvidence
Candidate-level evidence retained because it was needed to produce the selection decision. It is report-grade only and never a training input.
MethodsHpoCompletedProposal
A completed native proposal paired with its exact, scheduler-owned plan variant. Native checkpoints alone cannot reconstruct this value.
MethodsHpoCompletedReport
The sole report permitted to terminalize a persisted trial: the scalar cross-fold validation OOF average used by SELECT.
MethodsHpoControllerManifest
MethodsHpoNativeIncumbent
Native optimizer incumbent recorded beside scheduler evidence. This is the only portable assertion that DAG-ML’s SELECT agrees with Methods best().
MethodsHpoOofAverage
Per-sample OOF average retained with its matching targets. This is a serializable equivalent of the transient OofAverageBlock.
MethodsHpoResumeProvenance
Exact coordinator provenance bound to an N4MOPT checkpoint.
MethodsHpoResumeSelection
The scalar selection identity bound into a persisted Methods HPO campaign.
MethodsHpoResumeState
Atomic portable state required to resume a Methods HPO campaign.
MethodsHpoStudyConfig
Configuration that creates one official native optimizer. The optional dependency is intentionally local/provisional: n4m is not on crates.io; production builds must supply the matching libn4m through its build script.
MethodsHpoTerminalEvidence
MethodsPlsData
Provider response for one PLS fit/predict invocation.
MethodsPlsDataRequest
Scheduler-owned view selection for a portable Methods PLS operation.
MethodsPlsDataset
One identity-keyed dataset returned by the portable PLS provider capability.
MethodsPlsMatrix
Row-major f64 matrix passed from an explicitly capable provider to the portable Methods PLS controller. It never crosses the public ABI.
MethodsPlsPredictDataProvider
Native, in-memory data provider for target-free Methods PLS PREDICT.
MethodsPlsPredictInput
MetricEvaluationResult
MetricEvaluationScope
MetricEvaluationTask
MetricEvaluationValue
MetricProviderRegistry
MetricReference
MetricRoleReference
MetricSpec
ModelInputFusionPolicy
ModelInputPortSpec
ModelInputSpec
MonteCarloCartesianRepresentation
N4moptCheckpointArtifact
N4moptCheckpointReference
Durable archive-member reference for a Methods-owned N4MOPT payload.
NamespacedNodeParameters
NodeId
NodePatchPolicy
NodePlan
NodeResult
NodeSpec
NodeTask
ObservationId
ObservationPredictionBlock
OofAverageBlock
The per-sample cross-fold OOF average of one producer, surfaced alongside its scalar report so the host can show each OOF sample’s averaged prediction (nirs4all’s (validation, avg) row y_pred), not only the pooled scalar. The block is keyed by producer_node / partition = Validation / fold_id = "avg" — identical to the scalar RegressionMetricReport this pairs with — and the y_true covers exactly the block’s samples (same id set), so the host pairs them by id. This is REPORT-grade output: it carries no variant tag (the block has none; the variant is stamped on the report downstream) and never feeds a training/feature path, so OOF/leakage invariants are unaffected — it is purely the same averaged values the scalar was computed from, exposed per sample.
OofCampaign
OofMatrix
OpenLineageRunEventOptions
OperatorSelector
OperatorVariantModel
An operator-level variant model lowered from a single operator-level generator (Mechanism B’s PipelineDslStep::Generator): a GenerationDimension whose every choice carries an active_subsequence (the choice’s namespace key) — never param_overrides — paired with the EXACT set of namespaced node ids that choice activates.
OutputBinding
A resolved W0 OutputBinding with native port validation.
PackageArtifactBinding
ParallelScheduler
ParameterPatch
ParameterProjection
PhaseExecutionSchedule
PipelineDslBranch
PipelineDslBranchStep
PipelineDslChoiceRef
PipelineDslConcatBranch
PipelineDslConcatTransformStep
PipelineDslDataPort
PipelineDslGenerationChoice
PipelineDslGenerationConstraints
PipelineDslGenerationDimension
PipelineDslGenerationParamOverride
PipelineDslGeneratorConstraints
Operator-content pruning constraints on a PipelineDslGeneratorStep (ADR-17 1a/1b). Each ref is an operator-content label — a generator branch/option id (_or_) or branch id (_cartesian_), the operator class nirs4all carries in its _mutex_/_requires_/_exclude_. The keywords mirror the nirs4all generation oracle (_generator/constraints.py): mutex = the full group may not all co-occur (issubset), requires = [a, b] means a present requires b present, exclude = [a, b] is a forbidden pair. Compiled to a single-dimension GenerationConstraints over the operator dimension and applied during sequence-build, NOT carried onto OperatorVariantModel.generation_spec.
PipelineDslGeneratorStage
PipelineDslGeneratorStep
PipelineDslMergeModelStep
PipelineDslMergeSelector
PipelineDslMergeStep
PipelineDslOperatorStep
PipelineDslPredictionPort
PipelineDslSequenceStep
PipelineDslShapePlan
PipelineDslSpec
PipelineDslTuningSpec
PipelineDslVariantChoice
PortRef
PortSchema
PortSpec
PortablePredictorPackage
Portable deployment package. It contains only JSON-safe contracts and artifact descriptors; process-local handles live exclusively in LoadedPredictor.
PredictionBlock
PredictionCacheMaterializationRecord
PredictionCacheMaterializationRequest
PredictionInputSpec
PredictionJoinPolicy
PredictorTemplate
RankedCandidate
ReductionPlan
RefitArtifactRecord
RefitSlotPlan
RegressionConformalInterval
Multi-row, multi-target interval at one coverage.
RegressionConformalMetrics
Reconstructed regression interval metrics for one coverage and target scope.
RegressionMetricReport
RegressionTargetBlock
RegressionTargetRecord
A host-emitted y_true block tagged with the prediction it scores (producer/partition/fold), so the runtime can aggregate ground truth across folds to score cross-fold ensembles natively.
RelationContract
ReplayDataIdentity
Content identity for one external replay input.
ReplayPhaseRequest
RepresentationComboSelectionRecord
RepresentationCompatibilityReport
RepresentationReplayManifest
RepresentationSampleObservationMapping
ResearchProvenanceExport
ResearchProvenancePackage
ResearchProvenancePackageFile
ResearchProvenancePackageValidation
ResolvedLossSpec
ResolvedTrainingOutput
RunContext
RunId
RuntimeControllerRegistry
RuntimeHpoCampaignResult
RuntimeHpoCampaignTask
Typed scheduler operation used to create one invocation-local HPO session. It deliberately contains no graph NodePlan: the session controls variant campaigns for target_node_id, while all predictor work remains in the ordinary graph execution plan.
RuntimeHpoCandidateEvaluation
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.
RuntimeHpoCheckpointResult
Durable native optimizer state paired with exact coordinator evidence. No native Context or Optimizer object crosses this boundary.
RuntimeHpoCompletedReport
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.
RuntimeHpoExecutionContext
Immutable coordinator evidence for one execution-local HPO campaign.
RuntimeHpoFailure
RuntimeHpoIncumbent
One typed native incumbent, derived from the optimizer’s best() only after every scheduler-observed proposal has reached a terminal state.
RuntimeHpoIntermediate
RuntimeHpoProposal
One candidate proposed by a local tuner session. It contains a normal plan variant only; no native optimizer/context can cross the scheduler boundary.
RuntimeHpoProvenance
RuntimeHpoSelectionTarget
RuntimeHpoTerminalSnapshot
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.
SampleId
SampleRelation
SampleRelationSet
SchemaMigrationPolicy
ScoreSet
SeedContext
SelectionDecision
SelectionMetric
SelectionPolicy
SequentialScheduler
ShapeDelta
SplitConformalQuantile
Quantile record for one requested coverage.
SplitInvocation
StackFixedRepresentation
StackPaddedMaskedRepresentation
StackingFitContract
StackingOofRefitContract
StackingOofRefitCoverageDiagnostic
StratifiedKFoldSpec
Stratified K-fold: each sample is validated exactly once (OOF-safe like plain K-fold), but folds are balanced by a per-sample class label so every fold mirrors the overall class distribution. strata maps each sample id to its class label (identity-keyed metadata — never feature values).
TargetId
TrainingArtifactOptions
TrainingContractProjection
TrainingDataIdentity
Content identity paired with one external data requirement.
TrainingExecutionInput
Host-owned resources and portable identifiers for one native training run.
TrainingInfluenceEntry
TrainingInfluenceManifest
TrainingLossRoleReference
TrainingOptions
TrainingOutcome
Portable result of COMPILE/PLAN/FIT_CV/SELECT and optional REFIT.
TrainingOutcomeRef
TrainingOutputRequest
Requested output metadata before the producing port has been resolved.
TrainingRefitOutcome
Exact W0 refit state embedded in TrainingOutcome.
TrainingReplayOutcome
TrainingReplayRequest
TrainingRequest
TrainingResourceLimits
TrainingSchedulerOptions
ValidatedMetricEvaluation
VariantExecutionSpec
VariantId
VariantPlan
VariantSelection
Outcome of native variant selection: the winning variant plus EVERY scored variant’s cross-validation reports, each tagged with its own variant_id.
VariantSelectionOutcome
Extended result of native variant selection.
VariantValidationPredictions
One scored variant’s VALIDATION (OOF) predictions, captured from its transient FIT_CV RunContext and 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 with VariantSelection::validation_reports: it never feeds a training/feature path (see the field docs on VariantSelection::variant_validation_predictions).

Enums§

AggregationControllerInput
AggregationControllerOutput
AggregationMethod
AggregationWeights
ArtifactBackend
ArtifactLoadMode
ArtifactPolicy
AugmentationScope
BranchViewMode
CanonicalInteger
An integer parsed without passing through binary64.
ChainEffectLens
Normalization lens that makes heterogeneous datasets comparable.
ChainStepRole
Coarse role of a chain step; drives color/legend and position/order scoping in downstream consumers.
CombinationMode
ConformalError
Validation or finite-arithmetic failure in the native conformal kernels.
ConformalMeasurementStatus
Availability of finite width and interval-score summaries.
ConformalMultiTargetPolicy
Multi-target nonconformity reduction for split regression intervals.
ConformalRadius
One calibrated radius.
ConformalSmallSamplePolicy
Behavior when ceil((n + 1) * coverage) exceeds n.
ControllerCapability
ControllerFitScope
CriterionInput
CvArtifactRetention
DagMlError
DataPlanStepKind
DataRequestPartition
EntityUnitLevel
EvaluationScope
FeatureSelectionScope
FitBoundary
FitInfluenceMechanism
FitInfluencePolicy
FittedArtifactMode
FoldPartition
FoldPartitionMode
How validation membership is distributed across a fold set.
GenerationStrategy
Granularity
HandleKind
HpoCategory
HpoCategoryType
HpoDirection
HpoError
HpoEvent
HpoMetric
HpoNativeParameterKind
HpoParameter
Ordered declaration is intentional: it is part of replay identity and is retained in every trial, unlike a map’s lexical order.
HpoPruner
HpoReportOutcome
HpoSampler
HpoTerminal
HpoTrialStatus
ImplementationCapability
ImplementationSemanticKind
InferenceFeatures
LearningTaskKind
LossCapability
LossReduction
LossResolutionSource
MetaRowDomain
MetaTrainingFeatures
MethodsHpoCompletedState
MetricCapability
MetricDecomposition
MetricObjective
MetricReduction
MetricRoleKind
MetricUnitId
MissingMetricPolicy
MissingnessPolicy
ModelInputFusionMode
NestedCvSpec
Inner (nested) cross-validation policy.
NodeKind
OutputOrder
ParameterNamespace
Phase
PipelineDslBranchMode
PipelineDslGeneratorMode
PipelineDslGeneratorValue
PipelineDslMergeOutput
PipelineDslParamGenerator
PipelineDslSelectionSpec
PipelineDslStep
PortCardinality
PortKind
PortabilityClass
PredictionCacheRetention
PredictionJoinKey
PredictionKind
PredictionLevel
PredictionPartition
PredictionUnitId
ReductionAxis
ReductionMethod
ReductionRole
ReductionTaskCompatibility
RefitStrategy
RegressionIntervalCell
One regression interval cell.
RegressionMetricKind
ReplayabilityClass
RepresentationCardinality
RepresentationCompatibilityOutcome
RepresentationCompatibilitySeverity
RepresentationMissingSourcePolicy
RepresentationPlan
RngPolicy
RuntimeHpoIntermediateOutcome
RuntimeHpoTerminal
SelectionProtocol
SemanticSpecKind
ShapeDeltaKind
SplitUnit
StackingOofRefitCause
StackingOofRefitDecision
StackingOofRefitPolicy
Tcv1Error
Parse or encoding failure for the strict TCV1 domain.
TrainingInfluenceKind
TrainingRefitStatus
TrainingSchedulerBackend
TrainingSchedulerKind
TypedCanonicalValue
A strict JSON value that retains integer-versus-binary64 token kind.

Constants§

AGGREGATION_CONTROLLER_RESULT_SCHEMA_ID
AGGREGATION_CONTROLLER_RESULT_SCHEMA_VERSION
AGGREGATION_CONTROLLER_TASK_SCHEMA_ID
AGGREGATION_CONTROLLER_TASK_SCHEMA_VERSION
ARCHIVE_V2_BUNDLE_MEMBER
ARCHIVE_V2_CACHE_MEMBER
ARCHIVE_V2_GRAPH_MEMBER
ARCHIVE_V2_OUTCOME_MEMBER
ARCHIVE_V2_PACKAGE_MEMBER
ARCHIVE_V2_SCORE_MEMBER
BOUND_TRAINING_OUTPUT_SCHEMA_VERSION
BUNDLE_PREDICTION_CACHE_FORMAT
CACHE_NAMESPACE_SCHEMA_ID
CACHE_NAMESPACE_SCHEMA_VERSION
CAMPAIGN_SPEC_SCHEMA_ID
CAMPAIGN_SPEC_SCHEMA_VERSION
CHAIN_EFFECT_SCHEMA_ID
Stable $id of the serialized chain-effect analysis schema.
CHAIN_EFFECT_SCHEMA_VERSION
Current schema version of ChainEffectAnalysis.
CONFORMAL_RUNTIME_SCHEMA_VERSION
V1 did not bind calibration to the training/replay provenance closure. It is deliberately not accepted: callers must migrate to this closed V2 form.
CONFORMAL_TRAINING_REPLAY_OUTCOME_SCHEMA_VERSION
CONTROLLER_MANIFEST_SCHEMA_ID
CONTROLLER_MANIFEST_SCHEMA_VERSION
DAGML_OPENLINEAGE_FACET_SCHEMA_URL
DATA_OUTPUT_PROVENANCE_KEY
DATA_OUTPUT_PROVENANCE_SCHEMA_ID
DATA_OUTPUT_PROVENANCE_SCHEMA_VERSION
DATA_PLAN_SCHEMA_ID
DATA_PLAN_SCHEMA_VERSION
DSL_DATA_AWARE_FANOUT_METADATA_KEY
Metadata key under which fan_out_data_aware_branches records the deterministic fingerprint of the discovered partition set, so identical data always expands to a byte-identical spec (and therefore a byte-identical graph/campaign fingerprint downstream).
EARLY_STOPPING_RECORD_SCHEMA_ID
EARLY_STOPPING_RECORD_SCHEMA_VERSION
EXECUTION_BUNDLE_FILE
EXECUTION_BUNDLE_SCHEMA_VERSION
EXECUTION_PLAN_FILE
EXECUTION_PLAN_SCHEMA_ID
EXECUTION_PLAN_SCHEMA_VERSION
EXTERNAL_DATA_PLAN_ENVELOPE_SCHEMA_VERSION
FILE_ARTIFACT_MANIFEST_FILE
FILE_ARTIFACT_MANIFEST_SCHEMA_VERSION
FILE_PREDICTION_CACHE_MANIFEST_FILE
FILE_PREDICTION_CACHE_STORE_SCHEMA_VERSION
GRAPH_SPEC_SCHEMA_ID
GRAPH_SPEC_SCHEMA_VERSION
HPO_MANIFEST_SCHEMA_VERSION
IMPLEMENTATION_DESCRIPTOR_SCHEMA_ID
IMPLEMENTATION_DESCRIPTOR_SCHEMA_VERSION
LEGACY_BUNDLE_PREDICTION_CACHE_FORMAT
LEGACY_EXECUTION_BUNDLE_SCHEMA_VERSION
LEGACY_PORTABLE_PREDICTOR_PACKAGE_SCHEMA_VERSION
LEGACY_PREDICTION_CACHE_PAYLOAD_SCHEMA_VERSION
LEGACY_SCORE_SET_SCHEMA_VERSION
LEGACY_TRAINING_OUTCOME_SCHEMA_VERSION
LEGACY_TRAINING_REPLAY_OUTCOME_SCHEMA_VERSION
LINEAGE_RECORDS_FILE
LOSS_EXECUTION_ATTESTATION_SCHEMA_ID
LOSS_EXECUTION_ATTESTATION_SCHEMA_VERSION
LOSS_ROLE_SCHEMA_VERSION
LOSS_SPEC_SCHEMA_ID
LOSS_SPEC_SCHEMA_VERSION
MAX_CONFORMAL_SAMPLE_COUNT
Largest calibration sample count accepted by the exact rank routine.
MAX_N4MOPT_CHECKPOINT_BYTES
This mirrors the bound enforced by the official Rust binding and native decoder. Check it before any checkpoint is passed to a native loader.
METHODS_HPO_RESUME_STATE_SCHEMA_VERSION
Schema version for the durable, self-contained Methods HPO resume state.
METHODS_PLS_CONTROLLER_ID
Stable controller identity for the only portable numerical model admitted to the first Methods HPO route. Other model classes stay host/plugin-owned and are rejected during HPO preflight rather than being silently evaluated by a fixture or a replacement implementation.
METHODS_PLS_PREDICT_CONTENT_PROFILE
One host-materialized X-only cohort offered to the native Methods PLS controller for a fresh PREDICT replay.
METRIC_EVALUATION_RESULT_SCHEMA_ID
METRIC_EVALUATION_RESULT_SCHEMA_VERSION
METRIC_EVALUATION_TASK_SCHEMA_ID
METRIC_EVALUATION_TASK_SCHEMA_VERSION
METRIC_ROLE_SCHEMA_ID
METRIC_ROLE_SCHEMA_VERSION
METRIC_SPEC_SCHEMA_ID
METRIC_SPEC_SCHEMA_VERSION
MIN_READABLE_EXECUTION_BUNDLE_SCHEMA_VERSION
MIN_READABLE_PORTABLE_PREDICTOR_PACKAGE_SCHEMA_VERSION
MIN_READABLE_PREDICTION_CACHE_PAYLOAD_SCHEMA_VERSION
MIN_READABLE_SCORE_SET_SCHEMA_VERSION
MIN_READABLE_TRAINING_OUTCOME_SCHEMA_VERSION
MIN_READABLE_TRAINING_REPLAY_OUTCOME_SCHEMA_VERSION
MIN_WRITABLE_EXECUTION_BUNDLE_SCHEMA_VERSION
MIN_WRITABLE_PREDICTION_CACHE_PAYLOAD_SCHEMA_VERSION
MODEL_INPUT_SPEC_SCHEMA_ID
MODEL_INPUT_SPEC_SCHEMA_VERSION
N4MOPT_ARTIFACT_KIND
N4MOPT_CHECKPOINT_SCHEMA_VERSION
N4MOPT_FORMAT
NODE_RESULT_SCHEMA_ID
NODE_RESULT_SCHEMA_VERSION
NODE_TASK_SCHEMA_ID
NODE_TASK_SCHEMA_VERSION
OBSERVABILITY_FIELD_ALLOWLIST
Frozen ADR-12 telemetry field allowlist. Every field emitted by this module must appear here, and each entry is an identifier or a count — never data. Adding a field requires an ADR-12 update and a review per the privacy rule.
OPENLINEAGE_RUN_EVENT_SCHEMA_URL
OUTPUT_BINDING_SCHEMA_VERSION
PARAMETER_PATCH_SCHEMA_VERSION
PARAMETER_PROJECTION_SCHEMA_VERSION
PIPELINE_DSL_SCHEMA_ID
PIPELINE_DSL_SCHEMA_VERSION
PORTABLE_PREDICTOR_PACKAGE_SCHEMA_ID
PORTABLE_PREDICTOR_PACKAGE_SCHEMA_VERSION
V2 is the first package family permitted to carry closed conformal state.
PREDICTION_CACHE_PAYLOAD_SCHEMA_VERSION
PROV_JSONLD_FILE
REPRESENTATION_TABULAR_NUMERIC
Frozen representation id for a generic numeric feature table — the modality-neutral default stamped on data ports of a derived manifest. Published by the dag-ml-data representation registry (docs/contracts/representation_registry.v1.json, registry id dag-ml-data.representation_registry.v1, type_id = "table").
REPRESENTATION_TARGET_NUMERIC
Frozen representation id for a generic numeric target — the modality-neutral default stamped on target ports of a derived manifest. Published by the same registry (type_id = "target"). This replaces the previous coarse behaviour that (incorrectly) stamped the feature-table id on target ports.
RESEARCH_PROVENANCE_SCHEMA_VERSION
RO_CRATE_METADATA_FILE
SCORE_SET_SCHEMA_VERSION
Current on-disk schema version for newly written ScoreSet documents.
SELECTION_DECISION_SCHEMA_ID
SELECTION_DECISION_SCHEMA_VERSION
SELECTION_POLICY_SCHEMA_ID
SELECTION_POLICY_SCHEMA_VERSION
SOURCE_INDEX_METADATA_KEY
STACKING_OOF_REFIT_CONTRACT_METADATA_KEY
TCV1_PREFIX
Domain separator prepended to every TCV1 value before hashing.
TRAINING_INFLUENCE_MANIFEST_SCHEMA_VERSION
TRAINING_LOSS_ROLE_SCHEMA_ID
TRAINING_OUTCOME_SCHEMA_ID
TRAINING_OUTCOME_SCHEMA_VERSION
TRAINING_REPLAY_OUTCOME_SCHEMA_VERSION
V3 permits target-free external data identities for PREDICT/EXPLAIN while retaining V2’s typed conformal-interval closure for target-bound replays. The training-only identity remains deliberately target-bound; a replay on a fresh unlabeled cohort must not invent a target fingerprint simply to fit that training attestation type.
TRAINING_REPLAY_REQUEST_SCHEMA_VERSION
TRAINING_REQUEST_SCHEMA_ID
TRAINING_REQUEST_SCHEMA_VERSION

Traits§

HpoEvaluator
HpoIntermediateReporter
MetricProvider
RuntimeArtifactStore
RuntimeController
RuntimeDataProvider
RuntimePredictionCacheStore
RuntimeTunerSession
Per-campaign tuner state. Deliberately no Send or Sync supertrait: 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 a Send scheduler worker or registry.

Functions§

aggregate_observation_predictions
aggregate_sample_predictions_by_unit
apply_split_absolute_residual
Apply calibrated radii to a finite multi-target prediction matrix.
build_aggregated_prediction_cache_payload
build_aggregated_prediction_cache_record
build_archive_v2_native_portable_payloads
Assemble the strict ADR-23 P0 replay closure from real DAG-ML contracts.
build_execution_bundle
build_execution_bundle_with_prediction_contracts
build_execution_bundle_with_prediction_requirements
build_execution_plan
build_oof_prediction_cache_payloads
build_oof_prediction_cache_records
build_oof_prediction_requirements
Derive portable OOF requirements from the blocks produced by an existing FIT_CV execution. Shared by the training operation and host capture paths.
build_openlineage_run_event
build_openlineage_run_event_from_package_files
build_prediction_cache_payload
build_prediction_cache_record
build_research_provenance_export
build_research_provenance_package
builtin_loss_catalog
builtin_metric_catalog
builtin_metric_reference
builtin_metric_registry
bundle_prediction_requirement_key
calibrate_attached_training_replay
Calibrate a just-replayed output, then persist the signed native state on the owning training outcome and its execution bundle. The replay must have targeted the pre-calibration outcome; attachment deliberately produces a new outcome fingerprint for the portable predictor state.
campaign_fingerprint
capabilities_support_fit_influence
chain_role_for_node_kind
Map a graph NodeKind to its coarse ChainStepRole.
compile_operator_variant_models
Opt-in: lower the spec’s operator-level generators (Mechanism B’s PipelineDslStep::Generator) into one OperatorVariantModel each — an active_subsequence-only operator dimension plus the exact per-choice active-node-id set.
compile_pipeline_dsl
compile_pipeline_dsl_with_controller_registry
compile_pipeline_dsl_with_generation
compile_pipeline_dsl_with_generation_and_controller_registry
cross_fold_validation_reports
Score the cross-fold OOF average per producer port: concatenate each (producer_node, producer_port) pair’s per-fold VALIDATION predictions into one block and score it against the matching combined y_true. Yields one report per producer port with fold_id = "avg" — nirs4all’s cv_best_score row — plus, additively, the per-sample OOF average block + y_true each report was computed from (so the host can fill the (validation, avg) row’s per-sample y_pred, not only the scalar). The per-fold join is identity-keyed; producer ports with a single fold are skipped (nothing to ensemble).
data_binding_requirement_key
Return the stable wire key used to bind one node input to its external data requirement.
derive_host_controller_registry
Derive every spec and register the manifests into a fresh ControllerRegistry, surfacing the first derivation or duplicate-id error. This is the one call a runtime needs to turn its declared host controllers into a resolvable registry — the replacement for a hardcoded static node registry.
deserialize_external_contract
Deserialize one public JSON contract while rejecting serde’s positional sequence representation for structs. Semantic validation remains the owning type’s responsibility after this shape-preserving decode.
deserialize_external_value
Deserialize a public contract that has already crossed a structured host boundary (for example a Python mapping), while preserving the same object/array rules as deserialize_external_contract.
dispatch_custom_aggregation_task
dispatch_custom_observation_aggregation
dispatch_custom_sample_aggregation
emit_oof_refusal
Emit the ADR-12 out-of-fold leakage refusal event with stable taxonomy fields (category/code mirror crate::DagMlError::OofLeakage) so log consumers can alert on refusals without parsing messages.
enumerate_variants
execute_attached_training_replay
execute_loaded_predictor_replay
execute_training
Execute COMPILE/PLAN -> FIT_CV -> SELECT -> optional REFIT and return the complete portable W0 outcome.
execution_bundle_schema_migration_policy
fan_out_data_aware_branches
Plan-time, data-aware branch fan-out (the keystone of native branch support). Given a parsed pipeline DSL spec and the coordinator data-plan envelope, this turns each auto-separation branch step — a single-template branch over a by_metadata key or by_tag criterion, marked metadata.auto_separate=true — into an explicit branch step with one concrete branch per discovered partition value, retaining ALL of them.
finite_sample_conformal_rank
Compute ceil((n + 1) * coverage) from the binary64 shortest decimal.
fold_set_fingerprint
generation_spec_fingerprint
implementation_dispatch_key
Return the canonical process-local dispatch key for an implementation.
join_oof_campaign_features
join_oof_features
load_yaml_manifest_from_path
Load and validate a single manifest from disk.
load_yaml_manifests_from_dir
Walk a directory for *.controller.yaml files and return a deterministically ordered, validated manifest list. Duplicate controller_ids across files are rejected so a directory cannot silently ship two definitions of the same controller.
lower_nirs4all_compat_pipeline_dsl
manifest_kind_template
Return the deterministic manifest defaults for kind.
median
Median of the finite values (linear interpolation at the midpoint).
methods_hpo_resume_state_from_json
Strictly decode the complete, current Methods HPO resume state.
methods_hpo_resume_state_from_package_json
Deserialize a portable predictor package and extract its complete Methods HPO resume state. This deliberately accepts package JSON rather than a checkpoint/descriptor value: a resume is authorized only by state that has survived the package’s strict deserialization and cross-link validation.
methods_optimizer_preflight
A default-build preflight that fails before allocation, host data work, or any attempted replacement optimizer.
methods_pls_predict_feature_content_fingerprint
Compute the published X-only content identity for a Methods PLS cohort.
node_span
Build the per-node span (ADR-12), nested under the current phase span so node telemetry is attributed to its run, plan and controller. Identifiers only.
oof_campaign_fingerprint
operator_variant_canonical_value
Build the canonical serde_json::Value (the JSON array of {"kind", "class", "params"} steps) for a lowered operator sub-sequence — the exact value operator_variant_label hashes. Exposed so a host binding can render the SAME canonical text (and so callers can inspect it in tests).
operator_variant_label
Compute a choice’s variant_label: the cross-language content fingerprint (hex sha256) of a LOWERED operator sub-sequence (Phase 5).
operator_variant_label_from_steps_json
Cross-language entry point: compute the variant_label (hex sha256) of a lowered operator sub-sequence supplied as JSON (steps_json — a JSON array of PipelineDslSteps, the same shape each generator branch carries). The nirs4all host calls THIS through the dag-ml-py binding so it computes the fingerprint over the EXACT SAME canonicalization + serde_json::to_vec (ryu) codepath dag-ml uses to stamp reports — instead of re-deriving it in pure Python, whose json.dumps float formatting diverges from Rust’s for common params (1e-05, 1e-7, 1-ULP shortest decimals). Sharing this one function makes the host label byte-identical to the report label by construction.
orient
Orient a score so higher is always better.
parse_pipeline_dsl_json
parse_typed_json
Parse exactly one strict JSON document while retaining numeric token kind.
parse_typed_json_bytes
Parse exactly one strict UTF-8 JSON document while retaining numeric kind.
parse_yaml_manifest
Parse a single YAML manifest from raw text. The same ControllerManifest deserializer is reused so YAML and JSON cannot drift on field shape.
percentile_ranks
Percentile rank of each value in [0, 1] (1 = largest); average ties.
phase_span
Build the per-phase-scope span (ADR-12). run_id/plan_id correlate concurrent or overlapping runs; empty variant_id/fold_id mean the field is not applicable to the current phase. Fields are identifiers only.
plan_oof_partition_mode
The OOF FoldPartitionMode for a plan: its fold set’s mode, or Partition (the clean-OOF default) when the plan carries no fold set. Used to make the cross-fold scoring gate mode-aware so Resampled (ShuffleSplit / repeated CV) campaigns, where a sample is validated in several folds, are not rejected by the Partition exactly-once uniqueness rule.
prediction_cache_payload_schema_migration_policy
project_parameter_patches
Clone and deeply apply typed patches. Intermediate path segments must already exist and be objects; only the final object key may be new. Arrays are never addressable in V1.
prune_plan_to_active
Prune plan (a Mechanism-B operator-generator UNION plan, compiled as a STACKING graph: every choice’s terminal model fans into merge:generator_predictions -> model:meta) down to a single operator-SELECT candidate: the one operator choice in active_nodes plus the prefix it shares with the other choices, with the generator merge + meta-model + every inactive choice physically removed (C Phase 4, #23).
reassemble_merge_targets
Mandatory, central merge target-coverage invariant — the single gate every merge reassembly handler (separation/concat, fusion, off-fold) must pass through before emitting (or declining to emit) a producer-level RegressionTargetBlock for a reassembled merge prediction. It closes audit R-P1-9: a merge that should be scored must never silently produce no score.
reduce_predictions_across_branches
Reduce one prediction block per branch (each from a different producer/model) into a single fused block under merge_node, keyed by sample_id. This is the cross-branch analogue of reduce_predictions_across_folds: where that joins folds of one producer, this joins branches of one merge point. Asymmetric-branch fusion is intrinsic — a modelless branch simply emits no PredictionBlock, so it is absent from branch_blocks and contributes nothing. A sample is averaged over exactly the model-bearing branches that predicted it (its branch coverage), never over a fixed denominator, so partial coverage does not silently down-weight a sample. The join is identity-keyed and the union sample order is first-seen; positional joins are never used.
reduce_predictions_across_folds
Reduce per-fold prediction blocks (same producer + partition) into one block, keyed by sample_id — the native cross-fold ensemble dag-ml previously lacked. A sample that appears in exactly one fold (the disjoint OOF/validation case) passes through unchanged (mean-of-one); a sample predicted by several folds (the shared train/test case) is (weighted) averaged. avg = no weights; w_avg = per-fold weights (e.g. 1/shifted_val_rmse). First-seen sample order is preserved; the join is identity-keyed, never positional.
reduce_proba_mean_across_branches
Probability-mean fusion for classification: average per-class probability rows across branches, keyed by sample_id, under merge_node. Each row of every branch block is treated as a probability vector over the same width classes; rows must be finite, non-negative and sum to 1 (within PROBA_SUM_TOLERANCE). Like reduce_predictions_across_branches this is asymmetric-branch safe — modelless branches contribute no block — and each sample is averaged only over the branches that predicted it. The fused rows are renormalized so each output row is itself a valid probability distribution (it already sums to 1 under equal per-branch weight, but renormalization keeps the contract exact under floating-point and partial coverage).
refit_artifact_input_key
regression_conformal_metrics
Reconstruct regression coverage, width, and Winkler interval score.
regression_report_to_candidate_score
relation_set_fingerprint
representation_type_id
Return the frozen type_id registered for representation_id, or None when the id is outside the mirrored registry subset. Hosts use this to type a port while building an explicit data_requirements override; the adapter uses it to synthesize the default one.
resolve_inner_cv
Resolve the effective inner-CV policy for a node: a node-local policy overrides the campaign-global default; None means no nested CV.
resolve_pipeline_dsl_minimal_aliases
score_regression_aggregated_block
score_regression_prediction_block
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.
select_candidate
select_candidate_groups
split_absolute_residual_quantiles
Calibrate split absolute-residual radii for every requested coverage.
tcv1_encode
Encode one value using the DAG-ML TCV1 binary grammar.
tcv1_preimage
Return the domain-separated preimage DAGML-TCV1\0 || encode(value).
tcv1_sha256
Return lowercase SHA-256 of tcv1_preimage.
validate_conformal_coverages
Validate a non-empty, strictly increasing list of finite binary64 coverages.
validate_data_binding_envelope
validate_inner_fold_set_within_outer
Enforce the nested-CV invariant: every sample in inner — both the top-level universe and every fold’s train/validation members — must be an outer-fold training sample (never an outer-validation sample). Holds by construction for dag-ml-built inner folds, and also validates inner folds supplied from elsewhere. Refuses with an OOF-validation error on any leaking sample.
validate_oof_campaign
validate_prediction_blocks_against_folds
validate_prediction_blocks_are_oof
validate_prediction_cache_payload_matches_record
validate_producer_oof_coverage
Mandatory, central OOF coverage invariant — the single gate every path that concatenates a producer’s per-fold validation predictions into one out-of-fold set must pass through. Spec COORDINATOR_SPEC.md §“OOF And Leakage Rules” rule 3: every producer must provide exactly one validation prediction per requested sample unless an explicit aggregation policy says otherwise.
validate_research_provenance_package_files
validate_stacking_oof_refit_contract
validate_typed_serde_value
Validate a structured serde_json value against the same finite-number, nesting and NFC-key rules as a raw TCV1 document.
z_scores
Sample z-scores (mean 0, unit sd, n - 1 divisor); zero variance → all 0.

Type Aliases§

HpoResult
Result