From 00c53ca03e78fce405ad1821b39dbdf85a4b494a Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Mon, 22 Mar 2021 18:08:03 +0100 Subject: [PATCH] ... --- pl_examples/__init__.py | 2 +- pytorch_lightning/utilities/imports.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pl_examples/__init__.py b/pl_examples/__init__.py index 1459e6f626857..150ac309ddceb 100644 --- a/pl_examples/__init__.py +++ b/pl_examples/__init__.py @@ -18,7 +18,7 @@ _TORCHVISION_MNIST_AVAILABLE = not bool(os.environ.get("PL_USE_MOCKED_MNIST", False)) _DALI_AVAILABLE = _module_available("nvidia.dali") -if _TORCHVISION_AVAILABLE: +if _TORCHVISION_MNIST_AVAILABLE: try: from torchvision.datasets.mnist import MNIST MNIST(_DATASETS_PATH, download=True) diff --git a/pytorch_lightning/utilities/imports.py b/pytorch_lightning/utilities/imports.py index 7bb6f51b1195e..e07f93b07d221 100644 --- a/pytorch_lightning/utilities/imports.py +++ b/pytorch_lightning/utilities/imports.py @@ -43,7 +43,8 @@ def _module_available(module_path: str) -> bool: def _compare_version(package: str, op, version) -> bool: - """Compare package version with some requirements + """ + Compare package version with some requirements >>> _compare_version("torch", operator.ge, "0.1") True