Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
8eb6f887
Commit
8eb6f887
authored
Feb 28, 2019
by
Francisco Massa
Committed by
Soumith Chintala
Feb 28, 2019
Browse files
Remove dependency on tqdm (#768)
parent
c7191d56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
setup.py
setup.py
+0
-3
test/preprocess-bench.py
test/preprocess-bench.py
+1
-1
torchvision/datasets/utils.py
torchvision/datasets/utils.py
+3
-3
No files found.
setup.py
View file @
8eb6f887
...
...
@@ -45,9 +45,6 @@ pillow_ver = ' >= 4.1.1'
pillow_req
=
'pillow-simd'
if
get_dist
(
'pillow-simd'
)
is
not
None
else
'pillow'
requirements
.
append
(
pillow_req
+
pillow_ver
)
tqdm_ver
=
' == 4.19.9'
if
sys
.
version_info
[
0
]
<
3
else
''
requirements
.
append
(
'tqdm'
+
tqdm_ver
)
setup
(
# Metadata
name
=
'torchvision'
,
...
...
test/preprocess-bench.py
View file @
8eb6f887
import
argparse
import
os
from
timeit
import
default_timer
as
timer
from
t
qdm
import
tqdm
from
t
orch.utils.model_zoo
import
tqdm
import
torch
import
torch.utils.data
import
torchvision
...
...
torchvision/datasets/utils.py
View file @
8eb6f887
...
...
@@ -2,7 +2,7 @@ import os
import
os.path
import
hashlib
import
errno
from
t
qdm
import
tqdm
from
t
orch.utils.model_zoo
import
tqdm
def
gen_bar_updater
(
pbar
):
...
...
@@ -70,7 +70,7 @@ def download_url(url, root, filename=None, md5=None):
print
(
'Downloading '
+
url
+
' to '
+
fpath
)
urllib
.
request
.
urlretrieve
(
url
,
fpath
,
reporthook
=
gen_bar_updater
(
tqdm
(
unit
=
'B'
,
unit_scale
=
True
))
reporthook
=
gen_bar_updater
(
tqdm
())
)
except
OSError
:
if
url
[:
5
]
==
'https'
:
...
...
@@ -79,7 +79,7 @@ def download_url(url, root, filename=None, md5=None):
' Downloading '
+
url
+
' to '
+
fpath
)
urllib
.
request
.
urlretrieve
(
url
,
fpath
,
reporthook
=
gen_bar_updater
(
tqdm
(
unit
=
'B'
,
unit_scale
=
True
))
reporthook
=
gen_bar_updater
(
tqdm
())
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment