Skip to content

Commit

Permalink
feat(wandb): more explicit warning
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdayma authored and rohitgr7 committed Jan 6, 2021
1 parent 223fcab commit 121a8c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_lightning/loggers/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def log_metrics(self, metrics: Dict[str, float], step: Optional[int] = None) ->
metrics = self._add_prefix(metrics)
if self._sync_step and step is not None and step + self._step_offset < self.experiment.step:
self.warning_cache.warn(
'Trying to log at a previous step. Use `sync_step=False` or try logging with `commit=False` when calling manually `wandb.log`.')
'Trying to log at a previous step. '
'Use `WandbLogger(sync_step=False)` or try logging with `commit=False` when calling manually `wandb.log`.')
if self._sync_step:
self.experiment.log(metrics, step=(step + self._step_offset) if step is not None else None)
elif step is not None:
Expand Down

0 comments on commit 121a8c0

Please sign in to comment.