Skip to content

Commit e62c7c7

Browse files
authored
hotfix: mock examples (#6632)
* mock examples * drop from GA
1 parent 1fae10a commit e62c7c7

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
@@ -121,4 +121,6 @@ jobs:
121121
# cd pl_examples/basic_examples
122122
# bash submit_ddp_job.sh
123123
# bash submit_ddp2_job.sh
124+
env:
125+
PL_USE_MOCKED_MNIST: "1"
124126
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)