mirror of
https://github.com/wassname/pytorch-lightning.git
synced 2026-09-10 12:21:57 +08:00
wandb logger 'global_step' affects other logger (#1492)
* Removed unnecessary 'global_step' from wandb logger. * Fixed wrong step implementation in wandb and missing metric skipping in logger base. * simplified metric check in base logger * Added Fix Description in CHANGELOG.md * Updated wandb logger tests. * udpate test, step=3 * Moved Fix Description in CHANGELOG.md to unreleased. * Update CHANGELOG.md Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
This commit is contained in:
co-authored by
Adrian Wälchli
Jirka Borovec
parent
4dc77b5a1a
commit
152a2eb30c
@@ -14,11 +14,11 @@ def test_wandb_logger(wandb):
|
||||
logger = WandbLogger(anonymous=True, offline=True)
|
||||
|
||||
logger.log_metrics({'acc': 1.0})
|
||||
wandb.init().log.assert_called_once_with({'acc': 1.0})
|
||||
wandb.init().log.assert_called_once_with({'acc': 1.0}, step=None)
|
||||
|
||||
wandb.init().log.reset_mock()
|
||||
logger.log_metrics({'acc': 1.0}, step=3)
|
||||
wandb.init().log.assert_called_once_with({'global_step': 3, 'acc': 1.0})
|
||||
wandb.init().log.assert_called_once_with({'acc': 1.0}, step=3)
|
||||
|
||||
logger.log_hyperparams({'test': None})
|
||||
wandb.init().config.update.assert_called_once_with({'test': None}, allow_val_change=True)
|
||||
|
||||
Reference in New Issue
Block a user