Train_logger
- class conformer_rl.logging.train_logger.TrainLogger(tag: str, dir: str = 'data', use_tensorboard: bool = True, use_cache: bool = True, use_print: bool = True)
Used by agent for logging agent metrics during training.
- Parameters
tag (str) – Unique tag for identifying the logging session.
dir (str) – Path to root directory for where logging results should be saved.
use_tensorboard (bool) – Whether or not to save metrics to Tensorboard.
use_cache (bool) – Whether or not to keep a running cache of the metrics.
use_print (bool) – Whether or not to print metrics when logged.
- add_scalar(key: str, scalar_value: float, global_step: Optional[int] = None, walltime: Optional[float] = None) None
Logs a single scalar value.
- Parameters
key (str) – The key associated with the logged value.
scalar_value (float) – The value to be logged.
global_step (int) – The current agent step when logging the metric.
walltime (float) – The current time elapsed since the start of agent training.