Skip to content

Commit

Permalink
Patch pytorch_mnist.py until torchvision issue gets resolved
Browse files Browse the repository at this point in the history
See pytorch/vision#1938

Signed-off-by: Nicolas V Castet <nvcastet@us.ibm.com>
  • Loading branch information
nvcastet committed Mar 4, 2020
1 parent f406545 commit ce85225
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/pytorch_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
import torch.utils.data.distributed
import horovod.torch as hvd

# Temporary patch this script until the MNIST dataset download issue get resolved
# https://github.com/pytorch/vision/issues/1938
import urllib.request
opener = urllib.request.build_opener()
opener.addheaders = [('User-agent', 'Mozilla/5.0')]
urllib.request.install_opener(opener)

# Training settings
parser = argparse.ArgumentParser(description='PyTorch MNIST Example')
parser.add_argument('--batch-size', type=int, default=64, metavar='N',
Expand Down

0 comments on commit ce85225

Please sign in to comment.