tausurv.nn.training.logger
Reference
Section titled “Reference”Logger class
Section titled “Logger ”class Logger(out_dir: str | Path | None = None, *, verbose: bool = True, total_epochs: int = 0, use_progress_bar: bool | None = None)Live training logger with an in-place progress bar.
Three sinks, all flushed on every write:
out_dir/train.jsonl— one JSON record per event (train,val,checkpoint,message).out_dir/train.log— one flat human-readable line per event; safe totail -f.- Stdout — when attached to a tty, a single line is overwritten in place
with an ASCII bar showing
epoch/total_epochsplus current train metrics. Validation, checkpoints and messages clear the bar line, print on their own line, and the nextlog_trainredraws the bar. When stdout is not a tty (piped to a file, CI logs) or whenuse_progress_bar=False, this falls back to one flat line per event.
Parameters
Section titled “Parameters”out_dir— str or Path or None — Files are only written when set.verbose— bool, default True — Suppresses all stdout output when False.total_epochs— int, default 0 — Used to render the bar’s fill fraction.0disables the fill.use_progress_bar— bool or None, default None —Noneauto-detects fromsys.stdout.isatty(). SetFalseto force flat per-line output;Trueto force the bar (useful in tests).