pub struct CheckpointNotification {
pub model_path: String,
pub model_name: String,
pub version: u64,
pub saved_at: String,
pub training_step: u64,
pub metadata: HashMap<String, String>,
}Expand description
A notification emitted by the backward service when a new model checkpoint has been saved to disk.
Fields§
§model_path: StringAbsolute or relative path to the saved checkpoint file.
model_name: StringHuman-readable model name / architecture identifier
(e.g. "lstm_dqn_v1").
version: u64Monotonically increasing version number for this checkpoint lineage. Can be used by consumers to skip stale notifications that arrive out of order.
saved_at: StringISO-8601 / RFC-3339 timestamp of when the checkpoint was saved.
training_step: u64Training step (gradient step count) at which this checkpoint was
produced. 0 if unknown.
metadata: HashMap<String, String>Optional key-value metadata attached by the producer (e.g. loss, mean Q, learning rate at checkpoint time).
Implementations§
Source§impl CheckpointNotification
impl CheckpointNotification
Sourcepub fn new(model_path: impl Into<String>, model_name: impl Into<String>) -> Self
pub fn new(model_path: impl Into<String>, model_name: impl Into<String>) -> Self
Create a new checkpoint notification with sensible defaults.
version and training_step default to 0; callers should set
them explicitly when the information is available.
Sourcepub fn with_version(self, version: u64) -> Self
pub fn with_version(self, version: u64) -> Self
Set the version number.
Sourcepub fn with_training_step(self, step: u64) -> Self
pub fn with_training_step(self, step: u64) -> Self
Set the training step.
Trait Implementations§
Source§impl Clone for CheckpointNotification
impl Clone for CheckpointNotification
Source§fn clone(&self) -> CheckpointNotification
fn clone(&self) -> CheckpointNotification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more