use super::NodeId;
use crate::{checkpoint::base::Checkpointer, grads::Gradients, graph::Parent};
use alloc::boxed::Box;
#[cfg(feature = "distributed")]
use burn_backend::distributed::DistributedParams;
pub trait Step: Send + core::fmt::Debug {
fn step(self: Box<Self>, grads: &mut Gradients, checkpointer: &mut Checkpointer);
fn depth(&self) -> usize;
fn node(&self) -> NodeId;
fn parents(&self) -> &[Parent];
#[cfg(feature = "distributed")]
fn distributed_params(&self) -> Option<DistributedParams>;
}
pub type StepBoxed = Box<dyn Step>;