Skip to content

Commit

Permalink
Fix compare version for packages (#10762)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 authored Nov 26, 2021
1 parent 3d6262b commit e507bc9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed the `{validation,test}_step` outputs getting moved to CPU with `Trainer(move_metrics_to_cpu=True)` ([#10631](https://github.com/PyTorchLightning/pytorch-lightning/pull/10631))


- Fixed `_compare_version` for python packages ([#10762](https://github.com/PyTorchLightning/pytorch-lightning/pull/10762))


## [1.5.2] - 2021-11-16

Expand Down
2 changes: 1 addition & 1 deletion pytorch_lightning/utilities/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _compare_version(package: str, op: Callable, version: str, use_base_version:
pkg_version = Version(pkg.__version__)
else:
# try pkg_resources to infer version
pkg_version = Version(pkg_resources.get_distribution(pkg).version)
pkg_version = Version(pkg_resources.get_distribution(package).version)
except TypeError:
# this is mocked by Sphinx, so it should return True to generate all summaries
return True
Expand Down

0 comments on commit e507bc9

Please sign in to comment.