Skip to main content

RuntimeDataProvider

Trait RuntimeDataProvider 

Source
pub trait RuntimeDataProvider {
    // Required methods
    fn materialize(
        &self,
        request: &DataMaterializationRequest,
    ) -> Result<HandleRef, DagMlError>;
    fn make_view(
        &self,
        request: &DataViewRequest,
    ) -> Result<HandleRef, DagMlError>;

    // Provided methods
    fn training_data_identity(
        &self,
        _binding: &DataBinding,
    ) -> Result<Option<TrainingDataIdentity>, DagMlError> { ... }
    fn coordinator_relations(
        &self,
        _binding: &DataBinding,
    ) -> Result<Option<SampleRelationSet>, DagMlError> { ... }
    fn methods_pls_capability(&self) -> Result<(), DagMlError> { ... }
    fn preflight_methods_pls(
        &self,
        request: &MethodsPlsDataRequest,
    ) -> Result<(), DagMlError> { ... }
    fn methods_pls_data(
        &self,
        _request: &MethodsPlsDataRequest,
    ) -> Result<MethodsPlsData, DagMlError> { ... }
}

Required Methods§

Provided Methods§

Source

fn training_data_identity( &self, _binding: &DataBinding, ) -> Result<Option<TrainingDataIdentity>, DagMlError>

Attest the exact feature and target content bound to one training input.

Legacy phase execution may return None; the native W1 training operation requires Some and compares it byte-for-byte with the signed TrainingDataIdentity.

Source

fn coordinator_relations( &self, _binding: &DataBinding, ) -> Result<Option<SampleRelationSet>, DagMlError>

Source

fn methods_pls_capability(&self) -> Result<(), DagMlError>

Confirm that this provider can supply the deliberately narrow numeric view consumed by the portable Methods PLS controller. The default is a refusal, so an ordinary data provider can never accidentally expose its buffers to a native numerical controller.

Source

fn preflight_methods_pls( &self, request: &MethodsPlsDataRequest, ) -> Result<(), DagMlError>

Source

fn methods_pls_data( &self, _request: &MethodsPlsDataRequest, ) -> Result<MethodsPlsData, DagMlError>

Return provider-selected row-major numeric values for a Methods PLS invocation. This is not a raw IO escape hatch: the request carries the scheduler-created, identity-keyed data views and the provider is solely responsible for resolving them to rows and targets.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§