Expand description
Public Rust facade for dag-ml-data.
Modules§
- adapter
- aggregation
- ADR-07 canonical prediction-aggregation reducer contract.
- alignment
- buffer
- buffer_
file_ store - Deterministic binary persistence for
NumericFeatureBufferStore. - collation
- coordinator
- error
- fingerprint
- fitted_
adapter - fusion
- handle
- ids
- model
- nd_
tensor - Borrowed N-D tensor transport: host-owned dense tensors (e.g. uint8
[N,H,W,C]RGB, float32[N,H,W,Wavelength]hyperspectral) copied into provider-owned, canonical row-major storage, keyed and gathered byobservation_id. - plan
- planner
- relation
Structs§
- Adapter
Path - Adapter
Registry - Adapter
Registry Spec - Adapter
Spec - Aggregation
Policy - Aggregation policy: which reducer collapses repeated predictions to one value
per sample, plus the single parameter that reducer accepts. Parameters that
do not belong to the chosen reducer must be absent (enforced by
validate).Nonenumeric parameters take the ADR-07 defaults (DEFAULT_TRIM_FRACTION,DEFAULT_THRESHOLD). - Alignment
Policy - Augmentation
Metadata - Axis
Size Contract - Axis
Spec - Collation
Policy - Coordinate
Spec - Typed coordinate contract for an axis, so methods can machine-rely on the coordinate dtype, ordering and (for numeric) regular-grid structure rather than re-deriving them from untyped JSON.
- Coordinator
Branch View - Coordinator
Branch View Selector - Coordinator
Data Handle Record - Coordinator
Data Materialization Request - Coordinator
Data Plan Envelope - Coordinator
Data View Record - Coordinator
Feature Block - Coordinator
Feature Block F64 - Typed sibling of
CoordinatorFeatureBlock: the same projection with the cells flattened row-major into oneVec<f64>instead of per-cell JSON values. Produced by the*_f64projection path so a large numeric block never allocatesrows × colsboxedserde_json::Values. Masked cells are rejected by that path (it has noNullto project them into). - Coordinator
Feature Row - Coordinator
Feature Table - Coordinator
Handle Arena - Coordinator
Handle Ref - Coordinator
Multi Target Block - Coordinator
Relation - Coordinator
Relation Set - Coordinator
Target Block - Coordinator
Target Table - Coordinator
Target Value - Data
Error Descriptor - A stable ADR-11 error payload that can be serialized across bindings.
- Data
Plan - Data
Plan Request - Data
Plan Step - Data
View - Dataset
Schema - Feature
Fusion Policy - Fitted
Adapter Handle Record - Fitted
Adapter Manifest - Fitted
Adapter Manifest Entry - Fitted
Adapter Materialization Request - Fitted
Adapter Ref - Fold
Assignment - FoldSet
- Exhaustive partition-style fold assignments.
- Fold
Spec - GroupId
- Group
Spec - InMemory
Fitted Adapter Store - Input
Port Spec - Metadata
Field Spec - Metadata
Schema - Model
Input Spec - NdTensor
- A stored, immutable, contiguous row-major N-D tensor.
- NdTensor
Arena - A store plus per-data-handle bindings, mirroring
NumericFeatureBufferArena. - NdTensor
Binding - Binding of one stored tensor to a materialized data handle.
- NdTensor
Block - A relation-ordered, axis-0-filtered export of a stored tensor.
shape[0]is the number of selected rows;datais contiguous row-major bytes. - NdTensor
Input - A canonical (contiguous row-major) N-D tensor handed to the store. The C ABI layer copies any strided borrowed input into this shape before calling in.
- NdTensor
Manifest - Provider-wide manifest of one stored tensor (no payload bytes).
- NdTensor
Store - An immutable collection of N-D tensors keyed by
tensor_id. - Numeric
Collation Input Block - Numeric
Feature Buffer - Numeric
Feature Buffer Arena - Numeric
Feature Buffer Binding - Numeric
Feature Buffer Manifest - Numeric
Feature Buffer Store - Numeric
Feature Matrix F64 - Numeric
Feature Matrix F64Columnar - Numeric
Tensor Block - Observation
Id - Origin
Id - Path
Resolution - Plan
Issue - Planning
Policy - Presence
Mask - Repetition
Id - Representation
Id - Representation
Node - Representation
Spec - Sample
Alignment Plan - Sample
Id - Sample
Relation - Sample
Relation Table - Shape
Contract - Source
Descriptor - Source
Feature Block - Source
Id - Source
Sample Set - Target
Id - TypeId
Enums§
- Aggregation
Reducer Name - Canonical per-sample aggregation reducer name (ADR-07).
- Alignment
Mode - Axis
Kind - Collation
Padding - CoordinateD
Type - Element dtype of an axis coordinate sequence.
- Coordinate
Values - Axis coordinate values: either an explicit per-index list or a regular
numeric grid (
value(i) = start + i * step, count taken from the axis size). - Coordinator
Branch View Mode - Coordinator
Handle Kind - Data
Error - Data
Plan Step Kind - FitScope
- Fitted
Adapter Backend - Group
Kind - Metadata
Value Kind - NdTensorD
Type - Element dtype of an N-D tensor. The C ABI exposes a matching
#[repr(C)]DagMlDataTensorDTypeenum and maps to/from this type explicitly; this core enum carries no ABI guarantee of its own. - Prediction
Task Kind - Prediction task kind needed to validate task-sensitive reducers. This is a
deliberately tiny enum; the bridge maps its richer task type into it. It does
not make
dag-ml-datathe home of DAG-ML task semantics. - Signal
Kind - Source
Granularity
Constants§
- CANONICAL_
AGGREGATION_ REDUCERS - The canonical reducer names. The
customescape hatch is intentionally not listed; it is addressed bycustom_reducer_idinstead. This array is the source of truth for the canonical set (the conformance pack pins only the C ABI validator symbol, not a shared reducer list). - COORDINATOR_
BRANCH_ VIEW_ SCHEMA_ ID - COORDINATOR_
BRANCH_ VIEW_ SCHEMA_ VERSION - COORDINATOR_
DATA_ PLAN_ ENVELOPE_ SCHEMA_ VERSION - DEFAULT_
THRESHOLD - Default
thresholdforexclude_outlierswhen unspecified (ADR-07). - DEFAULT_
TRIM_ FRACTION - Default
trim_fractionforrobust_meanwhen unspecified (ADR-07). - FITTED_
ADAPTER_ MANIFEST_ SCHEMA_ VERSION - FITTED_
ADAPTER_ REF_ SCHEMA_ ID - FITTED_
ADAPTER_ REF_ SCHEMA_ VERSION - ND_
TENSOR_ MANIFEST_ SCHEMA_ VERSION - Schema version of
NdTensorManifest/NdTensorBinding. - ND_
TENSOR_ MAX_ RANK - Maximum supported tensor rank. Bounds the shape-product arithmetic and keeps the contract finite.
- NUMERIC_
FEATURE_ BUFFER_ FILE_ FORMAT_ VERSION - NUMERIC_
FEATURE_ BUFFER_ MANIFEST_ SCHEMA_ VERSION
Traits§
- Runtime
Fitted Adapter Store - Runtime contract for materializing opaque host-owned fitted-adapter
handles from a previously registered
FittedAdapterRef. The store validates the request’sparams_fingerprintagainst the registered ref and returns the opaque handle id. It never reads, writes or deserializes adapter payloads — payload materialization happens host-side, behind the opaque handle.
Functions§
- alignment_
metadata - alignment_
mode_ from_ fusion - build_
sample_ alignment_ plan - collate_
feature_ block - collate_
numeric_ block - coordinator_
relations_ from_ sample_ table - data_
plan_ fingerprint - deserialize_
columnar_ store - Parse a
.n4dbyte stream back into a store. Rejects unknown magic, unsupported versions, truncated streams, and any tampering of the payload caught by SHA-256 mismatch. - fold_
set_ fingerprint - fuse_
feature_ blocks - numeric_
input_ from_ feature_ block - plan_
model_ input - read_
store_ from_ path - Read a store back from
path. Errors propagate the validation failure fromdeserialize_columnar_storealongside the path for diagnostics. - require_
signal_ type_ match - Validate that a provider-declared
actualsignal type matches theexpectedone the plan or bundle records (ADR-06). TheUnknownpolicy is the caller’s: passallow_unknown = trueat train time (an untagged signal type is tolerated) andfalseat predict time (a trained pipeline must carry a concrete signal type, so any difference — includingUnknown— is refused). - sample_
relation_ fingerprint - schema_
fingerprint - serialize_
columnar_ store - Serialize a store to its deterministic
.n4dbyte stream. The output ends with a 32-byte SHA-256 of all preceding bytes so callers can distinguish truncation from intentional empty stores and detect any later tampering throughdeserialize_columnar_store. - source_
sample_ set_ from_ feature_ block - write_
store_ to_ path - Write a store to
path. Replaces any existing file at the destination.