Skip to main content

ReplicaProtocol

Trait ReplicaProtocol 

Source
pub trait ReplicaProtocol: Send + 'static {
    type Msg: Send + 'static;

    // Required method
    fn make_step(
        chunk: Vec<TrainSample>,
        reply: Sender<Result<ReplicaStepResult, GpuError>>,
    ) -> Self::Msg;
}
Expand description

Per-replica step contract. Each replica receives a chunk of the mini-batch and replies with (loss, grad_norm) for that chunk.

Required Associated Types§

Source

type Msg: Send + 'static

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§