Skip to content

Commit 7b3bf48

Browse files
awaelchlilexierule
authored andcommitted
1.3.8 release commit
1 parent a6beac9 commit 7b3bf48

File tree

9 files changed

+24
-10
lines changed

9 files changed

+24
-10
lines changed

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66

77

8+
## [1.3.8] - 2021-06-30
9+
10+
- Fixed a sync deadlock when checkpointing a `LightningModule` that uses a torchmetrics 0.4 `Metric` ([#8218](https://github.com/PyTorchLightning/pytorch-lightning/pull/8218))
11+
- Fixed compatibility TorchMetrics v0.4 ([#8206](https://github.com/PyTorchLightning/pytorch-lightning/pull/8206))
12+
- Added torchelastic check when sanitizing GPUs ([#8095](https://github.com/PyTorchLightning/pytorch-lightning/pull/8095))
13+
- Fixed a DDP info message that was never shown ([#8111](https://github.com/PyTorchLightning/pytorch-lightning/pull/8111))
14+
- Fixed metrics deprecation message at module import level ([#8163](https://github.com/PyTorchLightning/pytorch-lightning/pull/8163))
15+
- Fixed a bug where an infinite recursion would be triggered when using the `BaseFinetuning` callback on a model that contains a `ModuleDict` ([#8170](https://github.com/PyTorchLightning/pytorch-lightning/pull/8170))
16+
- Added a mechanism to detect `deadlock` for `DDP` when only 1 process trigger an `Exception`. The mechanism will `kill the processes` when it happens ([#8167](https://github.com/PyTorchLightning/pytorch-lightning/pull/8167))
17+
- Fixed NCCL error when selecting non-consecutive device ids ([#8165](https://github.com/PyTorchLightning/pytorch-lightning/pull/8165))
18+
- Fixed SWA to also work with `IterableDataset` ([#8172](https://github.com/PyTorchLightning/pytorch-lightning/pull/8172))
19+
20+
821
## [1.3.7] - 2021-06-22
922

1023
- Fixed a bug where skipping an optimizer while using amp causes amp to trigger an assertion error ([#7975](https://github.com/PyTorchLightning/pytorch-lightning/pull/7975))
@@ -24,10 +37,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
2437
- Fixed setting `worker_init_fn` to seed dataloaders correctly when using DDP ([#7942](https://github.com/PyTorchLightning/pytorch-lightning/pull/7942))
2538
- Fixed `BaseFinetuning` callback to properly handle parent modules w/ parameters ([#7931](https://github.com/PyTorchLightning/pytorch-lightning/pull/7931))
2639

27-
## [1.3.6] - 2021-06-DD
28-
29-
- Fix compatibility TorchMetrics v0.4 ([#8206](https://github.com/PyTorchLightning/pytorch-lightning/pull/8206))
30-
3140

3241
## [1.3.5] - 2021-06-08
3342

pl_examples/basic_examples/autoencoder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test_dataloader(self):
115115

116116

117117
def cli_main():
118-
cli = LightningCLI(LitAutoEncoder, MyDataModule, seed_everything_default=1234)
118+
cli = LightningCLI(LitAutoEncoder, MyDataModule, seed_everything_default=1234, save_config_callback=None)
119119
result = cli.trainer.test(cli.model, datamodule=cli.datamodule)
120120
print(result)
121121

pl_examples/basic_examples/backbone_image_classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_dataloader(self):
128128

129129

130130
def cli_main():
131-
cli = LightningCLI(LitClassifier, MyDataModule, seed_everything_default=1234)
131+
cli = LightningCLI(LitClassifier, MyDataModule, seed_everything_default=1234, save_config_callback=None)
132132
result = cli.trainer.test(cli.model, datamodule=cli.datamodule)
133133
print(result)
134134

pl_examples/basic_examples/simple_image_classifier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def configure_optimizers(self):
7676

7777

7878
def cli_main():
79-
cli = LightningCLI(LitClassifier, MNISTDataModule, seed_everything_default=1234)
79+
cli = LightningCLI(LitClassifier, MNISTDataModule, seed_everything_default=1234, save_config_callback=None)
8080
result = cli.trainer.test(cli.model, datamodule=cli.datamodule)
8181
print(result)
8282

pytorch_lightning/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import time
22

33
_this_year = time.strftime("%Y")
4-
__version__ = '1.3.7post0'
4+
__version__ = '1.3.8'
55
__author__ = 'William Falcon et al.'
66
__author_email__ = '[email protected]'
77
__license__ = 'Apache-2.0'

pytorch_lightning/plugins/training_type/ddp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def post_dispatch(self) -> None:
296296
self.cluster_environment.teardown()
297297

298298
def barrier(self, *args, **kwargs) -> None:
299-
if not torch_distrib.is_initialized():
299+
if not (torch_distrib.is_available() and torch_distrib.is_initialized()):
300300
return
301301
if _TORCH_GREATER_EQUAL_1_8 and torch.distributed.get_backend() == "nccl":
302302
torch_distrib.barrier(device_ids=self.determine_ddp_device_ids())

pytorch_lightning/plugins/training_type/ddp_spawn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def __recover_child_process_weights(self, best_path, last_path):
272272
self.lightning_module.load_state_dict(ckpt)
273273

274274
def barrier(self, *args, **kwargs) -> None:
275-
if not torch_distrib.is_initialized():
275+
if not (torch_distrib.is_available() and torch_distrib.is_initialized()):
276276
return
277277
if _TORCH_GREATER_EQUAL_1_8 and torch.distributed.get_backend() == "nccl":
278278
torch_distrib.barrier(device_ids=self.determine_ddp_device_ids())

pytorch_lightning/utilities/distributed.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ def rank_zero_info(*args, stacklevel: int = 4, **kwargs):
105105
_info(*args, stacklevel=stacklevel, **kwargs)
106106

107107

108+
def distributed_available() -> bool:
109+
return torch.distributed.is_available() and torch.distributed.is_initialized() or tpu_distributed()
110+
111+
108112
def gather_all_tensors(result: Union[torch.Tensor], group: Optional[Any] = None):
109113
"""
110114
Function to gather all tensors from several ddp processes onto a list that

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ tensorboard>=2.2.0, !=2.5.0 # 2.5.0 GPU CI error: 'Couldn't build proto file in
1010
torchmetrics>=0.2.0
1111
pyDeprecate==0.3.0
1212
packaging>=17.0
13+
pillow!=8.3.0 # TODO: Delete line after https://github.com/python-pillow/Pillow/issues/5571

0 commit comments

Comments
 (0)