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
45498f26
Unverified
Commit
45498f26
authored
Jan 13, 2020
by
Vincent QB
Committed by
GitHub
Jan 13, 2020
Browse files
Upgrading to UserWarning so that the user gets the warning. (#402)
parent
79b33187
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
torchaudio/datasets/vctk.py
torchaudio/datasets/vctk.py
+2
-4
torchaudio/datasets/yesno.py
torchaudio/datasets/yesno.py
+1
-2
No files found.
torchaudio/datasets/vctk.py
View file @
45498f26
...
@@ -61,16 +61,14 @@ class VCTK(Dataset):
...
@@ -61,16 +61,14 @@ class VCTK(Dataset):
warnings
.
warn
(
warnings
.
warn
(
"In the next version, transforms will not be part of the dataset. "
"In the next version, transforms will not be part of the dataset. "
"Please use `downsample=False` to enable this behavior now, "
,
"Please use `downsample=False` to enable this behavior now, "
,
"and suppress this warning."
,
"and suppress this warning."
DeprecationWarning
,
)
)
if
transform
is
not
None
or
target_transform
is
not
None
:
if
transform
is
not
None
or
target_transform
is
not
None
:
warnings
.
warn
(
warnings
.
warn
(
"In the next version, transforms will not be part of the dataset. "
"In the next version, transforms will not be part of the dataset. "
"Please remove the option `transform=True` and "
"Please remove the option `transform=True` and "
"`target_transform=True` to suppress this warning."
,
"`target_transform=True` to suppress this warning."
DeprecationWarning
,
)
)
self
.
downsample
=
downsample
self
.
downsample
=
downsample
...
...
torchaudio/datasets/yesno.py
View file @
45498f26
...
@@ -42,8 +42,7 @@ class YESNO(Dataset):
...
@@ -42,8 +42,7 @@ class YESNO(Dataset):
warnings
.
warn
(
warnings
.
warn
(
"In the next version, transforms will not be part of the dataset. "
"In the next version, transforms will not be part of the dataset. "
"Please remove the option `transform=True` and "
"Please remove the option `transform=True` and "
"`target_transform=True` to suppress this warning."
,
"`target_transform=True` to suppress this warning."
DeprecationWarning
,
)
)
self
.
transform
=
transform
self
.
transform
=
transform
...
...
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