Skip to content

Commit d4dec6b

Browse files
committed
Remove dependency on tqdm
1 parent a8bad59 commit d4dec6b

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

setup.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ def find_version(*file_paths):
4545
pillow_req = 'pillow-simd' if get_dist('pillow-simd') is not None else 'pillow'
4646
requirements.append(pillow_req + pillow_ver)
4747

48-
tqdm_ver = ' == 4.19.9' if sys.version_info[0] < 3 else ''
49-
requirements.append('tqdm' + tqdm_ver)
50-
5148
setup(
5249
# Metadata
5350
name='torchvision',

test/preprocess-bench.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import argparse
22
import os
33
from timeit import default_timer as timer
4-
from tqdm import tqdm
4+
from torch.utils.model_zoo import tqdm
55
import torch
66
import torch.utils.data
77
import torchvision

torchvision/datasets/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os.path
33
import hashlib
44
import errno
5-
from tqdm import tqdm
5+
from torch.utils.model_zoo import tqdm
66

77

88
def gen_bar_updater(pbar):
@@ -70,7 +70,7 @@ def download_url(url, root, filename=None, md5=None):
7070
print('Downloading ' + url + ' to ' + fpath)
7171
urllib.request.urlretrieve(
7272
url, fpath,
73-
reporthook=gen_bar_updater(tqdm(unit='B', unit_scale=True))
73+
reporthook=gen_bar_updater(tqdm())
7474
)
7575
except OSError:
7676
if url[:5] == 'https':
@@ -79,7 +79,7 @@ def download_url(url, root, filename=None, md5=None):
7979
' Downloading ' + url + ' to ' + fpath)
8080
urllib.request.urlretrieve(
8181
url, fpath,
82-
reporthook=gen_bar_updater(tqdm(unit='B', unit_scale=True))
82+
reporthook=gen_bar_updater(tqdm())
8383
)
8484

8585

0 commit comments

Comments
 (0)