Skip to content
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

Move test model folders #17034

Merged
merged 33 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
babdc23
test - to be revert
ydshieh Apr 27, 2022
8ff0bde
temp change to generate new cache - to be reverted
ydshieh Apr 27, 2022
d09b62b
temp change to generate new cache - to be reverted
ydshieh Apr 27, 2022
75ff03c
clean-up
ydshieh Apr 27, 2022
ffbcad9
move test model folders (TODO: fix imports and others)
ydshieh Apr 26, 2022
7851bdb
fix (potentially partially) imports (in model test modules)
ydshieh Apr 26, 2022
fed0b1d
fix (potentially partially) imports (in tokenization test modules)
ydshieh Apr 26, 2022
c439b16
fix (potentially partially) imports (in feature extraction test modules)
ydshieh Apr 26, 2022
f35f1c5
fix import utils.test_modeling_tf_core
ydshieh Apr 26, 2022
2d801d2
fix path ../fixtures/
ydshieh Apr 26, 2022
7d1d1a5
fix imports about generation.test_generation_flax_utils
ydshieh Apr 26, 2022
ab59261
fix more imports
ydshieh Apr 26, 2022
ae4827b
fix fixture path
ydshieh Apr 26, 2022
faba7b6
fix get_test_dir
ydshieh Apr 26, 2022
8c9600e
update module_to_test_file
ydshieh Apr 26, 2022
732ca46
fix get_tests_dir from wrong transformers.utils
ydshieh Apr 26, 2022
16e269e
update config.yml (CircleCI)
ydshieh Apr 26, 2022
6b52d1f
fix style
ydshieh Apr 26, 2022
e971915
remove missing imports
ydshieh Apr 26, 2022
4b0320e
update new model script
ydshieh Apr 26, 2022
8b470d0
update check_repo
ydshieh Apr 26, 2022
3dad271
update SPECIAL_MODULE_TO_TEST_MAP
ydshieh Apr 26, 2022
790f0d9
fix style
ydshieh Apr 26, 2022
c31b9c9
add __init__
ydshieh Apr 27, 2022
39966aa
update self-scheduled
ydshieh Apr 27, 2022
c90b35c
fix add_new_model scripts
ydshieh Apr 27, 2022
579cdbf
check one way to get location back
ydshieh Apr 27, 2022
fa9cfd4
python setup.py build install
ydshieh Apr 27, 2022
021ae85
fix import in test auto
ydshieh May 1, 2022
825581f
update self-scheduled.yml
ydshieh May 1, 2022
b83abd8
update slack notification script
ydshieh May 1, 2022
0e44f67
Add comments about artifact names
ydshieh May 2, 2022
9bc8e1a
fix for yolos
ydshieh May 3, 2022
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
Prev Previous commit
Next Next commit
fix style
  • Loading branch information
ydshieh committed May 3, 2022
commit 6b52d1fd5316b6421096fb164c28b368589d8a7c
2 changes: 1 addition & 1 deletion tests/deepspeed/test_model_zoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from transformers import is_torch_available
from transformers.testing_utils import (
TestCasePlus,
get_tests_dir,
execute_subprocess_async,
get_gpu_count,
get_tests_dir,
require_deepspeed,
require_torch_gpu,
slow,
Expand Down
2 changes: 1 addition & 1 deletion tests/models/auto/test_processor_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
Wav2Vec2FeatureExtractor,
Wav2Vec2Processor,
)
from transformers.testing_utils import PASS, USER, is_staging_test, get_tests_dir
from transformers.testing_utils import PASS, USER, get_tests_dir, is_staging_test
from transformers.tokenization_utils import TOKENIZER_CONFIG_FILE
from transformers.utils import FEATURE_EXTRACTOR_NAME, is_tokenizers_available

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
from transformers import is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_modeling_common import ids_tensor
from ..bart.test_modeling_bart import BartStandaloneDecoderModelTester
from ..bert.test_modeling_bert import BertModelTester
from ..bert_generation.test_modeling_bert_generation import BertGenerationEncoderTester
from ..gpt2.test_modeling_gpt2 import GPT2ModelTester
from ..prophetnet.test_modeling_prophetnet import ProphetNetStandaloneDecoderModelTester
from ..roberta.test_modeling_roberta import RobertaModelTester
from ...test_modeling_common import ids_tensor


if is_torch_available():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
from transformers import is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, slow, torch_device

from ...test_modeling_flax_common import ids_tensor
from ..bart.test_modeling_flax_bart import FlaxBartStandaloneDecoderModelTester
from ..bert.test_modeling_flax_bert import FlaxBertModelTester
from ..gpt2.test_modeling_flax_gpt2 import FlaxGPT2ModelTester
from ...test_modeling_flax_common import ids_tensor


if is_flax_available():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
from transformers import is_tf_available, is_torch_available
from transformers.testing_utils import is_pt_tf_cross_test, require_tf, require_torch, slow, torch_device

from ...test_modeling_tf_common import ids_tensor
from ..bert.test_modeling_tf_bert import TFBertModelTester
from ..gpt2.test_modeling_tf_gpt2 import TFGPT2ModelTester
from ..rembert.test_modeling_tf_rembert import TFRemBertModelTester
from ..roberta.test_modeling_tf_roberta import TFRobertaModelTester
from ...test_modeling_tf_common import ids_tensor


if is_tf_available():
Expand Down
2 changes: 1 addition & 1 deletion tests/models/layoutxlm/test_tokenization_layoutxlm.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from transformers import AddedToken, LayoutXLMTokenizerFast, SpecialTokensMixin, is_tf_available, is_torch_available
from transformers.models.layoutxlm.tokenization_layoutxlm import LayoutXLMTokenizer
from transformers.testing_utils import (
is_pt_tf_cross_test,
get_tests_dir,
is_pt_tf_cross_test,
require_pandas,
require_scatter,
require_sentencepiece,
Expand Down
9 changes: 8 additions & 1 deletion tests/models/m2m_100/test_tokenization_m2m_100.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
from shutil import copyfile

from transformers import M2M100Tokenizer, is_torch_available
from transformers.testing_utils import get_tests_dir, nested_simplify, require_sentencepiece, require_tokenizers, require_torch, slow
from transformers.testing_utils import (
get_tests_dir,
nested_simplify,
require_sentencepiece,
require_tokenizers,
require_torch,
slow,
)
from transformers.utils import is_sentencepiece_available


Expand Down
8 changes: 7 additions & 1 deletion tests/models/mbart/test_tokenization_mbart.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@
import unittest

from transformers import SPIECE_UNDERLINE, BatchEncoding, MBartTokenizer, MBartTokenizerFast, is_torch_available
from transformers.testing_utils import get_tests_dir, nested_simplify, require_sentencepiece, require_tokenizers, require_torch
from transformers.testing_utils import (
get_tests_dir,
nested_simplify,
require_sentencepiece,
require_tokenizers,
require_torch,
)

from ...test_tokenization_common import TokenizerTesterMixin

Expand Down
9 changes: 8 additions & 1 deletion tests/models/mbart50/test_tokenization_mbart50.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@
from os.path import dirname

from transformers import SPIECE_UNDERLINE, BatchEncoding, MBart50Tokenizer, MBart50TokenizerFast, is_torch_available
from transformers.testing_utils import get_tests_dir, nested_simplify, require_sentencepiece, require_tokenizers, require_torch, slow
from transformers.testing_utils import (
get_tests_dir,
nested_simplify,
require_sentencepiece,
require_tokenizers,
require_torch,
slow,
)

from ...test_tokenization_common import TokenizerTesterMixin

Expand Down
2 changes: 1 addition & 1 deletion tests/models/pegasus/test_modeling_pegasus.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from transformers.utils import cached_property

from ...generation.test_generation_utils import GenerationTesterMixin
from ..mbart.test_modeling_mbart import AbstractSeq2SeqIntegrationTest
from ...test_configuration_common import ConfigTester
from ...test_modeling_common import ModelTesterMixin, ids_tensor
from ..mbart.test_modeling_mbart import AbstractSeq2SeqIntegrationTest


if is_torch_available():
Expand Down
8 changes: 7 additions & 1 deletion tests/models/plbart/test_tokenization_plbart.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@
import unittest

from transformers import SPIECE_UNDERLINE, BatchEncoding, PLBartTokenizer, is_torch_available
from transformers.testing_utils import get_tests_dir, nested_simplify, require_sentencepiece, require_tokenizers, require_torch
from transformers.testing_utils import (
get_tests_dir,
nested_simplify,
require_sentencepiece,
require_tokenizers,
require_torch,
)

from ...test_tokenization_common import TokenizerTesterMixin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
from transformers import is_flax_available, is_torch_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, slow, torch_device

from ...test_modeling_flax_common import floats_tensor, ids_tensor, random_attention_mask
from ..bart.test_modeling_flax_bart import FlaxBartStandaloneDecoderModelTester
from ..bert.test_modeling_flax_bert import FlaxBertModelTester
from ..gpt2.test_modeling_flax_gpt2 import FlaxGPT2ModelTester
from ...test_modeling_flax_common import floats_tensor, ids_tensor, random_attention_mask
from ..wav2vec2.test_modeling_flax_wav2vec2 import FlaxWav2Vec2ModelTester


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
from transformers import is_torch_available
from transformers.testing_utils import require_torch, slow, torch_device

from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
from ..bert.test_modeling_bert import BertModelTester
from ..speech_to_text.test_modeling_speech_to_text import Speech2TextModelTester
from ..speech_to_text_2.test_modeling_speech_to_text_2 import Speech2Text2StandaloneDecoderModelTester
from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
from ..wav2vec2.test_modeling_wav2vec2 import Wav2Vec2ModelTester


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
from transformers import is_flax_available, is_torch_available, is_vision_available
from transformers.testing_utils import is_pt_flax_cross_test, require_flax, require_vision, slow, torch_device

from ..gpt2.test_modeling_flax_gpt2 import FlaxGPT2ModelTester
from ...test_modeling_flax_common import floats_tensor, ids_tensor
from ..gpt2.test_modeling_flax_gpt2 import FlaxGPT2ModelTester
from ..vit.test_modeling_flax_vit import FlaxViTModelTester


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
torch_device,
)

from ..gpt2.test_modeling_tf_gpt2 import TFGPT2ModelTester
from ...test_modeling_tf_common import floats_tensor, ids_tensor
from ..gpt2.test_modeling_tf_gpt2 import TFGPT2ModelTester
from ..vit.test_modeling_tf_vit import TFViTModelTester


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
from transformers.testing_utils import require_torch, require_vision, slow, torch_device
from transformers.utils import cached_property, is_torch_available, is_vision_available

from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
from ..bart.test_modeling_bart import BartModelTester
from ..bert.test_modeling_bert import BertModelTester
from ..deit.test_modeling_deit import DeiTModelTester
from ..swin.test_modeling_swin import SwinModelTester
from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
from ..trocr.test_modeling_trocr import TrOCRStandaloneDecoderModelTester
from ..vit.test_modeling_vit import ViTModelTester

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
)
from transformers.utils import is_flax_available, is_torch_available, is_vision_available

from ...test_modeling_flax_common import floats_tensor, ids_tensor, random_attention_mask
from ..bert.test_modeling_flax_bert import FlaxBertModelTester
from ..clip.test_modeling_flax_clip import FlaxCLIPVisionModelTester
from ...test_modeling_flax_common import floats_tensor, ids_tensor, random_attention_mask
from ..vit.test_modeling_flax_vit import FlaxViTModelTester


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
from transformers.testing_utils import is_pt_flax_cross_test, require_torch, require_vision, slow, torch_device
from transformers.utils import is_flax_available, is_torch_available, is_vision_available

from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
from ..bert.test_modeling_bert import BertModelTester
from ..clip.test_modeling_clip import CLIPVisionModelTester
from ..deit.test_modeling_deit import DeiTModelTester
from ..roberta.test_modeling_roberta import RobertaModelTester
from ...test_modeling_common import floats_tensor, ids_tensor, random_attention_mask
from ..vit.test_modeling_vit import ViTModelTester


Expand Down
2 changes: 1 addition & 1 deletion tests/test_feature_extraction_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from huggingface_hub import Repository, delete_repo, login
from requests.exceptions import HTTPError
from transformers import AutoFeatureExtractor, Wav2Vec2FeatureExtractor
from transformers.testing_utils import PASS, USER, is_staging_test, get_tests_dir
from transformers.testing_utils import PASS, USER, get_tests_dir, is_staging_test
from transformers.utils import is_torch_available, is_vision_available


Expand Down