Skip to content

Disabled google drive based dataset tests until caching is resolved #1171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion test/data/test_builtin_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@
from ..common.parameterized_utils import load_params
from ..common.assets import conditional_remove

GOOGLE_DRIVE_BASED_DATASETS = [
'AmazonReviewFull',
'AmazonReviewPolarity',
'DBpedia',
'IMDB',
'IWSLT',
'SogouNews',
'WMT14',
'YahooAnswers',
'YelpReviewFull',
'YelpReviewPolarity'
]


def _raw_text_custom_name_func(testcase_func, param_num, param):
info = param.args[0]
Expand Down Expand Up @@ -155,6 +168,8 @@ def test_raw_ag_news(self):
name_func=_raw_text_custom_name_func)
def test_raw_text_classification(self, info):
dataset_name = info['dataset_name']
if dataset_name in GOOGLE_DRIVE_BASED_DATASETS:
return

# Currently disabled due to incredibly slow download and possibly wrong reference hash
if dataset_name == "WMTNewsCrawl":
Expand All @@ -178,7 +193,7 @@ def test_num_lines_of_dataset(self):

@parameterized.expand(list(sorted(torchtext.experimental.datasets.raw.DATASETS.keys())))
def test_raw_datasets_split_argument(self, dataset_name):
if 'drive.google' in torchtext.experimental.datasets.raw.URLS[dataset_name]:
if dataset_name in GOOGLE_DRIVE_BASED_DATASETS:
return
if 'statmt' in torchtext.experimental.datasets.raw.URLS[dataset_name]:
return
Expand All @@ -195,6 +210,8 @@ def test_raw_datasets_split_argument(self, dataset_name):

@parameterized.expand(["AG_NEWS", "WikiText2", "IMDB"])
def test_datasets_split_argument(self, dataset_name):
if dataset_name in GOOGLE_DRIVE_BASED_DATASETS:
return
dataset = torchtext.experimental.datasets.DATASETS[dataset_name]
train1 = dataset(split='train')
train2, = dataset(split=('train',))
Expand Down