Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
a55bc290
Commit
a55bc290
authored
Jun 22, 2018
by
Thierry Moreau
Committed by
Tianqi Chen
Jun 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving module import inside of download function (#1319)
parent
396bd562
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
python/tvm/contrib/download.py
+7
-6
No files found.
python/tvm/contrib/download.py
View file @
a55bc290
...
@@ -5,12 +5,6 @@ from __future__ import absolute_import as _abs
...
@@ -5,12 +5,6 @@ from __future__ import absolute_import as _abs
import
os
import
os
import
sys
import
sys
import
time
import
time
import
requests
if
sys
.
version_info
>=
(
3
,):
import
urllib.request
as
urllib2
else
:
import
urllib2
def
download
(
url
,
path
,
overwrite
=
False
,
size_compare
=
False
):
def
download
(
url
,
path
,
overwrite
=
False
,
size_compare
=
False
):
"""Downloads the file from the internet.
"""Downloads the file from the internet.
...
@@ -30,6 +24,13 @@ def download(url, path, overwrite=False, size_compare=False):
...
@@ -30,6 +24,13 @@ def download(url, path, overwrite=False, size_compare=False):
size_compare : bool, optional
size_compare : bool, optional
Whether to do size compare to check downloaded file.
Whether to do size compare to check downloaded file.
"""
"""
import
requests
if
sys
.
version_info
>=
(
3
,):
import
urllib.request
as
urllib2
else
:
import
urllib2
if
os
.
path
.
isfile
(
path
)
and
not
overwrite
:
if
os
.
path
.
isfile
(
path
)
and
not
overwrite
:
if
size_compare
:
if
size_compare
:
file_size
=
os
.
path
.
getsize
(
path
)
file_size
=
os
.
path
.
getsize
(
path
)
...
...
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