Skip to content

Commit

Permalink
Fix csv extension check (#6436)
Browse files Browse the repository at this point in the history
Co-authored-by: Carlos Mocholi <[email protected]>
(cherry picked from commit 01b9cf8)
  • Loading branch information
5n7-sk authored and lexierule committed Apr 14, 2021
1 parent 3fb7c5e commit 099badb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,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))


Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/core/saving.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 099badb

Please sign in to comment.