Remove Incorrect Comment in tools/build_libtorch and remove Python2 support in the module import (#44888)

Summary:
Fixes #{44293} and removes Python2 imports from MNIST download module as Python2 is not being supported.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/44888

Reviewed By: agolynski

Differential Revision: D23785579

Pulled By: bugra

fbshipit-source-id: d9380502380876282008dd2d5feb92a446648982
This commit is contained in:
Bugra Akyildiz 2020-09-18 10:01:41 -07:00 committed by Facebook GitHub Bot
parent 07b7e44ed1
commit cff0e57c31
2 changed files with 2 additions and 13 deletions

View File

@ -8,9 +8,6 @@ import sys
pytorch_root = dirname(dirname(abspath(__file__)))
sys.path.append(pytorch_root)
# If you want to modify flags or environmental variables that is set when
# building torch, you should do it in tools/setup_helpers/configure.py.
# Please don't add it here unless it's only used in LibTorch.
from tools.build_pytorch_libs import build_caffe2
from tools.setup_helpers.cmake import CMake

View File

@ -1,18 +1,10 @@
from __future__ import division
from __future__ import print_function
import argparse
import gzip
import os
from urllib.error import URLError
from urllib.request import urlretrieve
import sys
try:
from urllib.error import URLError
from urllib.request import urlretrieve
except ImportError:
from urllib2 import URLError
from urllib import urlretrieve
MIRRORS = [
'http://yann.lecun.com/exdb/mnist/',
'https://ossci-datasets.s3.amazonaws.com/mnist/',