hotfix: mock examples (#6632)

* mock examples

* drop from GA
This commit is contained in:
Jirka Borovec 2021-03-22 17:49:01 +01:00 committed by GitHub
parent 1fae10a2dc
commit e62c7c7839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -121,4 +121,6 @@ jobs:
# cd pl_examples/basic_examples
# bash submit_ddp_job.sh
# bash submit_ddp2_job.sh
env:
PL_USE_MOCKED_MNIST: "1"
displayName: 'Examples'

View File

@ -15,10 +15,10 @@ _PACKAGE_ROOT = os.path.dirname(_EXAMPLES_ROOT)
_DATASETS_PATH = os.path.join(_PACKAGE_ROOT, 'Datasets')
_TORCHVISION_AVAILABLE = _module_available("torchvision")
_TORCHVISION_MNIST_AVAILABLE = True
_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)