We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7156da commit f573043Copy full SHA for f573043
pytorch_lightning/utilities/imports.py
@@ -48,6 +48,8 @@ def _compare_version(package: str, op, version) -> bool:
48
>>> _compare_version("torch", operator.ge, "0.1")
49
True
50
"""
51
+ if not _module_available(package):
52
+ return False
53
try:
54
pkg = importlib.import_module(package)
55
assert hasattr(pkg, '__version__')
0 commit comments