Skip to main content

ValidationHook

Trait ValidationHook 

Source
pub trait ValidationHook: Send + Sync {
    // Provided method
    fn validate(
        &self,
        _key: &str,
        _reduced_a: &Tensor,
        _reduced_b: &Tensor,
    ) -> Result<(), Error> { ... }
}
Expand description

Pluggable post-reduce validation seam.

The real implementation (held-out-eval host) is a deferred, gated follow-on. Defining the trait now lets the eval-host swap in with zero consumer churn.

Provided Methods§

Source

fn validate( &self, _key: &str, _reduced_a: &Tensor, _reduced_b: &Tensor, ) -> Result<(), Error>

Inspect the freshly-reduced factors for one key. Return Ok(()) to accept or an error to reject the round. Default: accept everything.

Tensors are passed by reference and must not be moved across threads.

Implementors§