pub trait Tracker: Send + Sync {
// Required methods
fn run_id(&self) -> &str;
fn run_dir(&self) -> &Path;
fn sink(&self) -> Arc<dyn EventSink>;
fn save_manifest(&self, manifest: &RunManifest) -> Result<()>;
fn save_artifact(&self, rel_path: &str, bytes: &[u8]) -> Result<()>;
fn save_study(&self, study: &Study) -> Result<()>;
fn heartbeat(&self) -> Result<()>;
fn finalize(&self, state: RunState) -> Result<()>;
}Expand description
A tracking backend bound to one run.
The local implementation writes a run directory; a remote backend can implement the same contract over HTTP.
Required Methods§
Sourcefn save_manifest(&self, manifest: &RunManifest) -> Result<()>
fn save_manifest(&self, manifest: &RunManifest) -> Result<()>
Atomically write the manifest.
Sourcefn save_artifact(&self, rel_path: &str, bytes: &[u8]) -> Result<()>
fn save_artifact(&self, rel_path: &str, bytes: &[u8]) -> Result<()>
Write an artifact at a path relative to the run directory, creating parent directories as needed.
Sourcefn save_study(&self, study: &Study) -> Result<()>
fn save_study(&self, study: &Study) -> Result<()>
Atomically write study.json (tmp + rename — readers never see
a partial study, and a crash mid-write preserves the previous
complete version).