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
Torchaudio
Commits
09ac74db
Unverified
Commit
09ac74db
authored
Apr 27, 2018
by
David Pollack
Committed by
GitHub
Apr 27, 2018
Browse files
Merge pull request #37 from PgLoLo/master
Download of dataset requires to hold archive in memory
parents
5787787e
0fe0305a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
torchaudio/datasets/vctk.py
torchaudio/datasets/vctk.py
+1
-3
torchaudio/datasets/yesno.py
torchaudio/datasets/yesno.py
+1
-3
No files found.
torchaudio/datasets/vctk.py
View file @
09ac74db
...
...
@@ -181,9 +181,7 @@ class VCTK(data.Dataset):
filename
=
url
.
rpartition
(
'/'
)[
2
]
file_path
=
os
.
path
.
join
(
self
.
root
,
self
.
raw_folder
,
filename
)
if
not
os
.
path
.
isfile
(
file_path
):
data
=
urllib
.
request
.
urlopen
(
url
)
with
open
(
file_path
,
'wb'
)
as
f
:
f
.
write
(
data
.
read
())
urllib
.
request
.
urlretrieve
(
url
,
file_path
)
if
not
os
.
path
.
exists
(
dset_abs_path
):
with
tarfile
.
open
(
file_path
)
as
zip_f
:
zip_f
.
extractall
(
raw_abs_dir
)
...
...
torchaudio/datasets/yesno.py
View file @
09ac74db
...
...
@@ -101,9 +101,7 @@ class YESNO(data.Dataset):
filename
=
url
.
rpartition
(
'/'
)[
2
]
file_path
=
os
.
path
.
join
(
self
.
root
,
self
.
raw_folder
,
filename
)
if
not
os
.
path
.
isfile
(
file_path
):
data
=
urllib
.
request
.
urlopen
(
url
)
with
open
(
file_path
,
'wb'
)
as
f
:
f
.
write
(
data
.
read
())
urllib
.
request
.
urlretrieve
(
url
,
file_path
)
else
:
print
(
"Tar file already downloaded"
)
if
not
os
.
path
.
exists
(
dset_abs_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