mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-09 11:32:07 +08:00
Hacky fix for mlflow logger (#277)
* Hacky fix for mlflow logger It dies when "created_at" is logged * Log warning
This commit is contained in:
committed by
William Falcon
parent
133d6b3ec1
commit
222d7d2d5d
@@ -34,6 +34,11 @@ class MLFlowLogger(LightningLoggerBase):
|
|||||||
def log_metrics(self, metrics, step_num=None):
|
def log_metrics(self, metrics, step_num=None):
|
||||||
timestamp_ms = int(time() * 1000)
|
timestamp_ms = int(time() * 1000)
|
||||||
for k, v in metrics.items():
|
for k, v in metrics.items():
|
||||||
|
if isinstance(v, str):
|
||||||
|
logger.warning(
|
||||||
|
f"Discarding metric with string value {k}={v}"
|
||||||
|
)
|
||||||
|
continue
|
||||||
self.client.log_metric(self.run_id, k, v, timestamp_ms, step_num)
|
self.client.log_metric(self.run_id, k, v, timestamp_ms, step_num)
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user