Skip to content

[WIP][Do Not Review] enabling tests that depends on downloading from google drive #1180

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

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
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
26 changes: 13 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,18 @@ jobs:
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
command: echo "YYYY-WW $(date +"%Y-%U")" > .circleci-weekly-refresh
- restore_cache:

keys:
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}

- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:

key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}

paths:
- conda
Expand All @@ -365,7 +365,7 @@ jobs:
- restore_cache:
keys:

- data-linux-v1-{{ checksum ".circleci-weekly" }}
- data-linux-v1-{{ checksum ".circleci-weekly-refresh" }}

- run:
name: Run tests
Expand All @@ -374,7 +374,7 @@ jobs:
command: .circleci/unittest/linux/scripts/run_test.sh
- save_cache:

key: data-linux-v1-{{ checksum ".circleci-weekly" }}
key: data-linux-v1-{{ checksum ".circleci-weekly-refresh" }}

paths:
- .vector_cache
Expand All @@ -395,18 +395,18 @@ jobs:
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
command: echo "YYYY-WW $(date +"%Y-%U")" > .circleci-weekly-refresh
- restore_cache:

keys:
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}

- run:
name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh
- save_cache:

key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}

paths:
- conda
Expand All @@ -417,7 +417,7 @@ jobs:
- restore_cache:
keys:

- data-windows-v1-{{ checksum ".circleci-weekly" }}
- data-windows-v1-{{ checksum ".circleci-weekly-refresh" }}

- run:
name: Run tests
Expand All @@ -426,7 +426,7 @@ jobs:
command: .circleci/unittest/windows/scripts/run_test.sh
- save_cache:

key: data-windows-v1-{{ checksum ".circleci-weekly" }}
key: data-windows-v1-{{ checksum ".circleci-weekly-refresh" }}

paths:
- .vector_cache
Expand All @@ -448,18 +448,18 @@ jobs:
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
command: echo "YYYY-WW $(date +"%Y-%U")" > .circleci-weekly-refresh
- restore_cache:

keys:
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}

- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:

key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}

paths:
- conda
Expand Down
26 changes: 13 additions & 13 deletions .circleci/config.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -343,18 +343,18 @@ jobs:
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
command: echo "YYYY-WW $(date +"%Y-%U")" > .circleci-weekly-refresh
- restore_cache:
{% raw %}
keys:
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
paths:
- conda
Expand All @@ -365,7 +365,7 @@ jobs:
- restore_cache:
keys:
{% raw %}
- data-linux-v1-{{ checksum ".circleci-weekly" }}
- data-linux-v1-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
- run:
name: Run tests
Expand All @@ -374,7 +374,7 @@ jobs:
command: .circleci/unittest/linux/scripts/run_test.sh
- save_cache:
{% raw %}
key: data-linux-v1-{{ checksum ".circleci-weekly" }}
key: data-linux-v1-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
paths:
- .vector_cache
Expand All @@ -395,18 +395,18 @@ jobs:
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
command: echo "YYYY-WW $(date +"%Y-%U")" > .circleci-weekly-refresh
- restore_cache:
{% raw %}
keys:
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
- env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
- run:
name: Setup
command: .circleci/unittest/windows/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
key: env-v1-windows-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/windows/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
paths:
- conda
Expand All @@ -417,7 +417,7 @@ jobs:
- restore_cache:
keys:
{% raw %}
- data-windows-v1-{{ checksum ".circleci-weekly" }}
- data-windows-v1-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
- run:
name: Run tests
Expand All @@ -426,7 +426,7 @@ jobs:
command: .circleci/unittest/windows/scripts/run_test.sh
- save_cache:
{% raw %}
key: data-windows-v1-{{ checksum ".circleci-weekly" }}
key: data-windows-v1-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
paths:
- .vector_cache
Expand All @@ -448,18 +448,18 @@ jobs:
- run:
name: Generate cache key
# This will refresh cache on Sundays, nightly build should generate new cache.
command: echo "$(date +"%Y-%U")" > .circleci-weekly
command: echo "YYYY-WW $(date +"%Y-%U")" > .circleci-weekly-refresh
- restore_cache:
{% raw %}
keys:
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
- env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
- run:
name: Setup
command: .circleci/unittest/linux/scripts/setup_env.sh
- save_cache:
{% raw %}
key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly" }}
key: env-v1-linux-{{ arch }}-py<< parameters.python_version >>-{{ checksum ".circleci/unittest/linux/scripts/environment.yml" }}-{{ checksum ".circleci-weekly-refresh" }}
{% endraw %}
paths:
- conda
Expand Down
19 changes: 0 additions & 19 deletions test/data/test_builtin_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,6 @@
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 @@ -168,8 +155,6 @@ 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
if dataset_name == "WMTNewsCrawl":
Expand All @@ -193,8 +178,6 @@ 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 dataset_name in GOOGLE_DRIVE_BASED_DATASETS:
return
if 'statmt' in torchtext.experimental.datasets.raw.URLS[dataset_name]:
return
dataset = torchtext.experimental.datasets.raw.DATASETS[dataset_name]
Expand All @@ -210,8 +193,6 @@ 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