Commit 8eb6f887 authored by Francisco Massa's avatar Francisco Massa Committed by Soumith Chintala
Browse files

Remove dependency on tqdm (#768)

parent c7191d56
...@@ -45,9 +45,6 @@ pillow_ver = ' >= 4.1.1' ...@@ -45,9 +45,6 @@ pillow_ver = ' >= 4.1.1'
pillow_req = 'pillow-simd' if get_dist('pillow-simd') is not None else 'pillow' pillow_req = 'pillow-simd' if get_dist('pillow-simd') is not None else 'pillow'
requirements.append(pillow_req + pillow_ver) requirements.append(pillow_req + pillow_ver)
tqdm_ver = ' == 4.19.9' if sys.version_info[0] < 3 else ''
requirements.append('tqdm' + tqdm_ver)
setup( setup(
# Metadata # Metadata
name='torchvision', name='torchvision',
......
import argparse import argparse
import os import os
from timeit import default_timer as timer from timeit import default_timer as timer
from tqdm import tqdm from torch.utils.model_zoo import tqdm
import torch import torch
import torch.utils.data import torch.utils.data
import torchvision import torchvision
......
...@@ -2,7 +2,7 @@ import os ...@@ -2,7 +2,7 @@ import os
import os.path import os.path
import hashlib import hashlib
import errno import errno
from tqdm import tqdm from torch.utils.model_zoo import tqdm
def gen_bar_updater(pbar): def gen_bar_updater(pbar):
...@@ -70,7 +70,7 @@ def download_url(url, root, filename=None, md5=None): ...@@ -70,7 +70,7 @@ def download_url(url, root, filename=None, md5=None):
print('Downloading ' + url + ' to ' + fpath) print('Downloading ' + url + ' to ' + fpath)
urllib.request.urlretrieve( urllib.request.urlretrieve(
url, fpath, url, fpath,
reporthook=gen_bar_updater(tqdm(unit='B', unit_scale=True)) reporthook=gen_bar_updater(tqdm())
) )
except OSError: except OSError:
if url[:5] == 'https': if url[:5] == 'https':
...@@ -79,7 +79,7 @@ def download_url(url, root, filename=None, md5=None): ...@@ -79,7 +79,7 @@ def download_url(url, root, filename=None, md5=None):
' Downloading ' + url + ' to ' + fpath) ' Downloading ' + url + ' to ' + fpath)
urllib.request.urlretrieve( urllib.request.urlretrieve(
url, fpath, url, fpath,
reporthook=gen_bar_updater(tqdm(unit='B', unit_scale=True)) reporthook=gen_bar_updater(tqdm())
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment