Unverified Commit 45498f26 authored by Vincent QB's avatar Vincent QB Committed by GitHub
Browse files

Upgrading to UserWarning so that the user gets the warning. (#402)

parent 79b33187
...@@ -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
......
...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment