Log metrics.
(self, data: dict, step: int, commit: bool = False)
| 287 | self.console_logger = get_logger(__name__, in_ray_actor=True) |
| 288 | |
| 289 | def log(self, data: dict, step: int, commit: bool = False) -> None: |
| 290 | """Log metrics.""" |
| 291 | # SwanLab doesn't use commit flag; keep signature for compatibility |
| 292 | swanlab.log(data, step=step) |
| 293 | self.console_logger.info(f"{self.format_data_str(data, step)}") |
| 294 | |
| 295 | def close(self) -> None: |
| 296 | try: |