Skip to content

Commit

Permalink
hotfix: mock examples (#6632)
Browse files Browse the repository at this point in the history
* mock examples

* drop from GA
  • Loading branch information
Borda authored Mar 22, 2021
1 parent 1fae10a commit e62c7c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 2 additions & 2 deletions pl_examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
_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)
Expand Down

0 comments on commit e62c7c7

Please sign in to comment.