pub struct JsonlLogger { /* private fields */ }Expand description
JSONL (JSON Lines) logger for machine-readable output.
Writes each metric as a JSON object on its own line, making it easy to parse and process programmatically.
§Example
use tensorlogic_train::JsonlLogger;
use tensorlogic_train::LoggingBackend;
let mut logger = JsonlLogger::new("/tmp/metrics.jsonl").unwrap();
logger.log_scalar("loss", 0.5, 1).unwrap();
logger.log_scalar("accuracy", 0.95, 1).unwrap();
logger.flush().unwrap();Implementations§
Trait Implementations§
Source§impl Clone for JsonlLogger
impl Clone for JsonlLogger
Source§impl Debug for JsonlLogger
impl Debug for JsonlLogger
Source§impl LoggingBackend for JsonlLogger
impl LoggingBackend for JsonlLogger
Auto Trait Implementations§
impl Freeze for JsonlLogger
impl RefUnwindSafe for JsonlLogger
impl Send for JsonlLogger
impl Sync for JsonlLogger
impl Unpin for JsonlLogger
impl UnwindSafe for JsonlLogger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more