torchtnt.utils.loggers.FileLogger¶
-
class
torchtnt.utils.loggers.
FileLogger
(path: str, steps_before_flushing: int, log_all_ranks: bool)¶ Abstract file logger.
Parameters: - path (str) – path to write logs to
- steps_before_flushing – (int): Number of steps to store in log before flushing
- log_all_ranks – (bool): Log all ranks if true, else log only on rank 0.
-
__init__
(path: str, steps_before_flushing: int, log_all_ranks: bool) None ¶
Methods
__init__
(path, steps_before_flushing, ...)close
()flush
()log
(name, data, step)Log scalar data to file. log_dict
(payload, step)Add multiple scalar values. Attributes
path