Log metrics.
(self, data: dict, step: int, commit: bool = False)
| 107 | self.console_logger = get_logger(__name__, in_ray_actor=True) |
| 108 | |
| 109 | def log(self, data: dict, step: int, commit: bool = False) -> None: |
| 110 | """Log metrics.""" |
| 111 | for key in data: |
| 112 | self.logger.add_scalar(key, data[key], step) |
| 113 | self.console_logger.info(f"{self.format_data_str(data, step)}") |
| 114 | |
| 115 | def close(self) -> None: |
| 116 | self.logger.close() |
nothing calls this directly
no test coverage detected