Fix compare version for packages (#10762)
This commit is contained in:
parent
3d6262b7a9
commit
e507bc9027
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue