From bd1f09855aa3209a6bee83fefc6496ec30afc620 Mon Sep 17 00:00:00 2001 From: colehurwitz Date: Tue, 21 Jan 2020 14:39:21 +0000 Subject: [PATCH] passing experiment to wandb --- pytorch_lightning/logging/wandb.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytorch_lightning/logging/wandb.py b/pytorch_lightning/logging/wandb.py index 829006d85d0dd..6e4307492623a 100644 --- a/pytorch_lightning/logging/wandb.py +++ b/pytorch_lightning/logging/wandb.py @@ -33,7 +33,7 @@ class WandbLogger(LightningLoggerBase): """ def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=False, - version=None, project=None, tags=None): + version=None, project=None, tags=None, experiment=None): super().__init__() self._name = name self._save_dir = save_dir @@ -41,7 +41,7 @@ def __init__(self, name=None, save_dir=None, offline=False, id=None, anonymous=F self._id = version or id self._tags = tags self._project = project - self._experiment = None + self._experiment = experiment self._offline = offline def __getstate__(self): @@ -81,7 +81,7 @@ def log_hyperparams(self, params): @rank_zero_only def log_metrics(self, metrics, step=None): metrics["global_step"] = step - self.experiment.history.add(metrics) + self.experiment.log(metrics) def save(self): pass