Skip to content

Commit 014a6b7

Browse files
committed
hotfix: mock examples (#6632)
* mock examples * drop from GA
1 parent 4df060b commit 014a6b7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,6 @@ jobs:
103103
# cd pl_examples/basic_examples
104104
# bash submit_ddp_job.sh
105105
# bash submit_ddp2_job.sh
106+
env:
107+
PL_USE_MOCKED_MNIST: "1"
106108
displayName: 'Examples'

pl_examples/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
_DATASETS_PATH = os.path.join(_PACKAGE_ROOT, 'Datasets')
1616

1717
_TORCHVISION_AVAILABLE = _module_available("torchvision")
18-
_TORCHVISION_MNIST_AVAILABLE = True
18+
_TORCHVISION_MNIST_AVAILABLE = not bool(os.environ.get("PL_USE_MOCKED_MNIST", False))
1919
_DALI_AVAILABLE = _module_available("nvidia.dali")
2020

21-
if _TORCHVISION_AVAILABLE:
21+
if _TORCHVISION_MNIST_AVAILABLE:
2222
try:
2323
from torchvision.datasets.mnist import MNIST
2424
MNIST(_DATASETS_PATH, download=True)

0 commit comments

Comments
 (0)