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
chenpangpang
transformers
Commits
13deb95a
Unverified
Commit
13deb95a
authored
Jul 01, 2020
by
Sam Shleifer
Committed by
GitHub
Jul 01, 2020
Browse files
Move tests/utils.py -> transformers/testing_utils.py (#5350)
parent
9c219305
Changes
66
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
20 additions
and
25 deletions
+20
-25
tests/test_modeling_longformer.py
tests/test_modeling_longformer.py
+1
-1
tests/test_modeling_marian.py
tests/test_modeling_marian.py
+1
-2
tests/test_modeling_mobilebert.py
tests/test_modeling_mobilebert.py
+1
-1
tests/test_modeling_openai.py
tests/test_modeling_openai.py
+1
-1
tests/test_modeling_reformer.py
tests/test_modeling_reformer.py
+1
-1
tests/test_modeling_roberta.py
tests/test_modeling_roberta.py
+1
-1
tests/test_modeling_t5.py
tests/test_modeling_t5.py
+1
-1
tests/test_modeling_tf_albert.py
tests/test_modeling_tf_albert.py
+1
-1
tests/test_modeling_tf_auto.py
tests/test_modeling_tf_auto.py
+1
-2
tests/test_modeling_tf_bert.py
tests/test_modeling_tf_bert.py
+1
-1
tests/test_modeling_tf_camembert.py
tests/test_modeling_tf_camembert.py
+1
-2
tests/test_modeling_tf_common.py
tests/test_modeling_tf_common.py
+1
-2
tests/test_modeling_tf_ctrl.py
tests/test_modeling_tf_ctrl.py
+1
-1
tests/test_modeling_tf_distilbert.py
tests/test_modeling_tf_distilbert.py
+1
-1
tests/test_modeling_tf_electra.py
tests/test_modeling_tf_electra.py
+1
-1
tests/test_modeling_tf_flaubert.py
tests/test_modeling_tf_flaubert.py
+1
-2
tests/test_modeling_tf_gpt2.py
tests/test_modeling_tf_gpt2.py
+1
-1
tests/test_modeling_tf_mobilebert.py
tests/test_modeling_tf_mobilebert.py
+1
-1
tests/test_modeling_tf_openai_gpt.py
tests/test_modeling_tf_openai_gpt.py
+1
-1
tests/test_modeling_tf_roberta.py
tests/test_modeling_tf_roberta.py
+1
-1
No files found.
tests/test_modeling_longformer.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.testing_utils
import
require_torch
,
slow
,
torch_device
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.utils
import
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_marian.py
View file @
13deb95a
...
@@ -19,8 +19,7 @@ import unittest
...
@@ -19,8 +19,7 @@ import unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.file_utils
import
cached_property
from
transformers.file_utils
import
cached_property
from
transformers.hf_api
import
HfApi
from
transformers.hf_api
import
HfApi
from
transformers.testing_utils
import
require_torch
,
slow
,
torch_device
from
.utils
import
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_mobilebert.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.testing_utils
import
require_torch
,
slow
,
torch_device
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_common
import
ModelTesterMixin
,
floats_tensor
,
ids_tensor
from
.test_modeling_common
import
ModelTesterMixin
,
floats_tensor
,
ids_tensor
from
.utils
import
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_openai.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.testing_utils
import
require_torch
,
slow
,
torch_device
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.utils
import
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_reformer.py
View file @
13deb95a
...
@@ -16,10 +16,10 @@
...
@@ -16,10 +16,10 @@
import
unittest
import
unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.testing_utils
import
require_multigpu
,
require_torch
,
slow
,
torch_device
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_common
import
ModelTesterMixin
,
floats_tensor
,
ids_tensor
from
.test_modeling_common
import
ModelTesterMixin
,
floats_tensor
,
ids_tensor
from
.utils
import
require_multigpu
,
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_roberta.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.testing_utils
import
require_torch
,
slow
,
torch_device
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.utils
import
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_t5.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
is_torch_available
from
transformers
import
is_torch_available
from
transformers.testing_utils
import
require_torch
,
slow
,
torch_device
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.test_modeling_common
import
ModelTesterMixin
,
ids_tensor
from
.utils
import
require_torch
,
slow
,
torch_device
if
is_torch_available
():
if
is_torch_available
():
...
...
tests/test_modeling_tf_albert.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
AlbertConfig
,
is_tf_available
from
transformers
import
AlbertConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_auto.py
View file @
13deb95a
...
@@ -17,8 +17,7 @@
...
@@ -17,8 +17,7 @@
import
unittest
import
unittest
from
transformers
import
is_tf_available
from
transformers
import
is_tf_available
from
transformers.testing_utils
import
DUMMY_UNKWOWN_IDENTIFIER
,
SMALL_MODEL_IDENTIFIER
,
require_tf
,
slow
from
.utils
import
DUMMY_UNKWOWN_IDENTIFIER
,
SMALL_MODEL_IDENTIFIER
,
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_bert.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
BertConfig
,
is_tf_available
from
transformers
import
BertConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_camembert.py
View file @
13deb95a
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
from
transformers
import
is_tf_available
from
transformers
import
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_common.py
View file @
13deb95a
...
@@ -23,8 +23,7 @@ import unittest
...
@@ -23,8 +23,7 @@ import unittest
from
importlib
import
import_module
from
importlib
import
import_module
from
transformers
import
is_tf_available
,
is_torch_available
from
transformers
import
is_tf_available
,
is_torch_available
from
transformers.testing_utils
import
_tf_gpu_memory_limit
,
require_tf
from
.utils
import
_tf_gpu_memory_limit
,
require_tf
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_ctrl.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
CTRLConfig
,
is_tf_available
from
transformers
import
CTRLConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_distilbert.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
DistilBertConfig
,
is_tf_available
from
transformers
import
DistilBertConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_electra.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
ElectraConfig
,
is_tf_available
from
transformers
import
ElectraConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_flaubert.py
View file @
13deb95a
...
@@ -16,8 +16,7 @@
...
@@ -16,8 +16,7 @@
import
unittest
import
unittest
from
transformers
import
is_tf_available
from
transformers
import
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_gpt2.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
GPT2Config
,
is_tf_available
from
transformers
import
GPT2Config
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_mobilebert.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
MobileBertConfig
,
is_tf_available
from
transformers
import
MobileBertConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_openai_gpt.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
OpenAIGPTConfig
,
is_tf_available
from
transformers
import
OpenAIGPTConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
tests/test_modeling_tf_roberta.py
View file @
13deb95a
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
import
unittest
import
unittest
from
transformers
import
RobertaConfig
,
is_tf_available
from
transformers
import
RobertaConfig
,
is_tf_available
from
transformers.testing_utils
import
require_tf
,
slow
from
.test_configuration_common
import
ConfigTester
from
.test_configuration_common
import
ConfigTester
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.test_modeling_tf_common
import
TFModelTesterMixin
,
ids_tensor
from
.utils
import
require_tf
,
slow
if
is_tf_available
():
if
is_tf_available
():
...
...
Prev
1
2
3
4
Next
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