From 9cb8c11e7769a0c351644407b500efa8fc130159 Mon Sep 17 00:00:00 2001 From: Shunta Komatsu Date: Tue, 9 Mar 2021 19:56:21 +0900 Subject: [PATCH 1/4] fix: fix csv extension check --- pytorch_lightning/core/saving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/core/saving.py b/pytorch_lightning/core/saving.py index 280eca55260a7..4c6897ac80568 100644 --- a/pytorch_lightning/core/saving.py +++ b/pytorch_lightning/core/saving.py @@ -136,7 +136,7 @@ def load_from_checkpoint( if hparams_file is not None: extension = hparams_file.split('.')[-1] - if extension.lower() in ('csv'): + if extension.lower() in ('csv',): hparams = load_hparams_from_tags_csv(hparams_file) elif extension.lower() in ('yml', 'yaml'): hparams = load_hparams_from_yaml(hparams_file) From 7cba292c8c4f9b18e8cae979cc294529b251e066 Mon Sep 17 00:00:00 2001 From: Shunta Komatsu Date: Sat, 13 Mar 2021 18:43:02 +0900 Subject: [PATCH 2/4] refactor: compare with string --- pytorch_lightning/core/saving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/core/saving.py b/pytorch_lightning/core/saving.py index 4c6897ac80568..ffa9b0a1359ee 100644 --- a/pytorch_lightning/core/saving.py +++ b/pytorch_lightning/core/saving.py @@ -136,7 +136,7 @@ def load_from_checkpoint( if hparams_file is not None: extension = hparams_file.split('.')[-1] - if extension.lower() in ('csv',): + if extension.lower() == 'csv': hparams = load_hparams_from_tags_csv(hparams_file) elif extension.lower() in ('yml', 'yaml'): hparams = load_hparams_from_yaml(hparams_file) From dd4dbad3143e223bd9ae599412fe445c94f1a8ff Mon Sep 17 00:00:00 2001 From: Shunta Komatsu Date: Sat, 13 Mar 2021 18:46:15 +0900 Subject: [PATCH 3/4] docs: update CHANGELOG --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1c347c00a3f1..28f38a1f12508 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -136,6 +136,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed logger creating directory structure too early in DDP ([#6380](https://github.com/PyTorchLightning/pytorch-lightning/pull/6380)) +- Fixed csv extension check ([#6436](https://github.com/PyTorchLightning/pytorch-lightning/pull/6436)) + ## [1.2.2] - 2021-03-02 From 983ec2233d781edcfdc05d909aab125578a015cc Mon Sep 17 00:00:00 2001 From: Carlos Mocholi Date: Thu, 8 Apr 2021 02:54:44 +0200 Subject: [PATCH 4/4] Update CHANGELOG --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0e5778abdfa7..c05b5f2e28f34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -189,6 +189,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Do not print top-k verbose log with `ModelCheckpoint(monitor=None)` ([#6109](https://github.com/PyTorchLightning/pytorch-lightning/pull/6109)) +- Fixed csv extension check ([#6436](https://github.com/PyTorchLightning/pytorch-lightning/pull/6436)) + + - Fixed `ModelCheckpoint(monitor=None, save_last=True)` not saving checkpoints ([#6136](https://github.com/PyTorchLightning/pytorch-lightning/pull/6136)) @@ -291,8 +294,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Ensure that clip gradients is only called if the value is greater than 0 ([#6330](https://github.com/PyTorchLightning/pytorch-lightning/pull/6330) - Fixed `Trainer` not resetting `lightning_optimizers` when calling `Trainer.fit()` multiple times ([#6372](https://github.com/PyTorchLightning/pytorch-lightning/pull/6372)) -- Fixed csv extension check ([#6436](https://github.com/PyTorchLightning/pytorch-lightning/pull/6436)) - ## [1.2.2] - 2021-03-02