Log metrics.
(self, data: dict, step: int, commit: bool = False)
| 204 | mlflow.log_table(data=experiences_table, artifact_file=f"{table_name}.json") |
| 205 | |
| 206 | def log(self, data: dict, step: int, commit: bool = False) -> None: |
| 207 | """Log metrics.""" |
| 208 | self.console_logger.info(f"{self.format_data_str(data, step)}") |
| 209 | # Replace all '@' in keys with '_at_', as MLflow does not support '@' in metric names |
| 210 | data = {k.replace("@", "_at_"): v for k, v in data.items()} |
| 211 | mlflow.log_metrics(metrics=data, step=step) |
| 212 | |
| 213 | def close(self) -> None: |
| 214 | mlflow.end_run() |
nothing calls this directly
no test coverage detected