Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/pytorch_lightning/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed an issue to keep downscaling the batch size in case there hasn't been even a single successful optimal batch size with `mode="power"` ([#14372](https://github.com/Lightning-AI/lightning/pull/14372))


- Fixed `WandbLogger` `save_dir` is not set after creation ([#14326](https://github.com/Lightning-AI/lightning/pull/14326))



## [1.7.4] - 2022-08-31

Expand All @@ -162,9 +165,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed an issue to avoid the impact of sanity check on `reload_dataloaders_every_n_epochs` for validation ([#13964](https://github.com/Lightning-AI/lightning/pull/13964))


- Fixed `Trainer.estimated_stepping_batches` when maximum number of epochs is not set ([#14317](https://github.com/Lightning-AI/lightning/pull/14317))


## [1.7.2] - 2022-08-17

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/pytorch_lightning/loggers/wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def __init__(self, *args, **kwarg):

Args:
name: Display name for the run.
save_dir: Path where data is saved (wandb dir by default).
save_dir: Path where data is saved.
offline: Run offline (data can be streamed later to wandb servers).
id: Sets the version, mainly used to resume a previous run.
version: Same as id.
Expand Down Expand Up @@ -255,7 +255,7 @@ def __init__(self, *args, **kwarg):
def __init__(
self,
name: Optional[str] = None,
save_dir: Optional[str] = None,
save_dir: str = ".",
offline: bool = False,
id: Optional[str] = None,
anonymous: Optional[bool] = None,
Expand Down Expand Up @@ -300,7 +300,7 @@ def __init__(
name=name,
project=project,
id=version or id,
dir=save_dir,
dir=save_dir or kwargs.pop("dir"),
resume="allow",
anonymous=("allow" if anonymous else None),
)
Expand Down
8 changes: 7 additions & 1 deletion tests/tests_pytorch/loggers/test_wandb.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@ def test_wandb_logger_init(wandb, monkeypatch):
wandb.init.reset_mock()
WandbLogger(project="test_project").experiment
wandb.init.assert_called_once_with(
name=None, dir=None, id=None, project="test_project", resume="allow", anonymous=None
name=None, dir=".", id=None, project="test_project", resume="allow", anonymous=None
)

# test wandb.init set save_dir correctly after created
wandb.run = None
wandb.init.reset_mock()
logger = WandbLogger(project="test_project")
assert logger.save_dir is not None

# test wandb.init and setting logger experiment externally
wandb.run = None
run = wandb.init()
Expand Down