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
3772af49
Unverified
Commit
3772af49
authored
Nov 24, 2021
by
NielsRogge
Committed by
GitHub
Nov 24, 2021
Browse files
[Tests] Improve vision tests (#14458)
* Improve tests * Install vision for tf tests
parent
f2e90bcb
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
5 deletions
+9
-5
.circleci/config.yml
.circleci/config.yml
+2
-2
.github/workflows/self-scheduled.yml
.github/workflows/self-scheduled.yml
+2
-2
tests/test_modeling_beit.py
tests/test_modeling_beit.py
+1
-0
tests/test_modeling_deit.py
tests/test_modeling_deit.py
+1
-0
tests/test_modeling_tf_vit.py
tests/test_modeling_tf_vit.py
+2
-1
tests/test_modeling_vit.py
tests/test_modeling_vit.py
+1
-0
No files found.
.circleci/config.yml
View file @
3772af49
...
@@ -277,7 +277,7 @@ jobs:
...
@@ -277,7 +277,7 @@ jobs:
-
v0.4-tf-{{ checksum "setup.py" }}
-
v0.4-tf-{{ checksum "setup.py" }}
-
v0.4-{{ checksum "setup.py" }}
-
v0.4-{{ checksum "setup.py" }}
-
run
:
pip install --upgrade pip
-
run
:
pip install --upgrade pip
-
run
:
pip install .[sklearn,tf-cpu,testing,sentencepiece,tf-speech]
-
run
:
pip install .[sklearn,tf-cpu,testing,sentencepiece,tf-speech
,vision
]
-
save_cache
:
-
save_cache
:
key
:
v0.4-tf-{{ checksum "setup.py" }}
key
:
v0.4-tf-{{ checksum "setup.py" }}
paths
:
paths
:
...
@@ -310,7 +310,7 @@ jobs:
...
@@ -310,7 +310,7 @@ jobs:
-
v0.4-tf-{{ checksum "setup.py" }}
-
v0.4-tf-{{ checksum "setup.py" }}
-
v0.4-{{ checksum "setup.py" }}
-
v0.4-{{ checksum "setup.py" }}
-
run
:
pip install --upgrade pip
-
run
:
pip install --upgrade pip
-
run
:
pip install .[sklearn,tf-cpu,testing,sentencepiece,tf-speech]
-
run
:
pip install .[sklearn,tf-cpu,testing,sentencepiece,tf-speech
,vision
]
-
save_cache
:
-
save_cache
:
key
:
v0.4-tf-{{ checksum "setup.py" }}
key
:
v0.4-tf-{{ checksum "setup.py" }}
paths
:
paths
:
...
...
.github/workflows/self-scheduled.yml
View file @
3772af49
...
@@ -143,7 +143,7 @@ jobs:
...
@@ -143,7 +143,7 @@ jobs:
run
:
|
run
:
|
apt -y update && apt install -y libsndfile1-dev git
apt -y update && apt install -y libsndfile1-dev git
pip install --upgrade pip
pip install --upgrade pip
pip install .[sklearn,testing,onnx,sentencepiece,tf-speech]
pip install .[sklearn,testing,onnx,sentencepiece,tf-speech
,vision
]
-
name
:
Are GPUs recognized by our DL frameworks
-
name
:
Are GPUs recognized by our DL frameworks
run
:
|
run
:
|
...
@@ -293,7 +293,7 @@ jobs:
...
@@ -293,7 +293,7 @@ jobs:
run
:
|
run
:
|
apt -y update && apt install -y libsndfile1-dev git
apt -y update && apt install -y libsndfile1-dev git
pip install --upgrade pip
pip install --upgrade pip
pip install .[sklearn,testing,onnx,sentencepiece,tf-speech]
pip install .[sklearn,testing,onnx,sentencepiece,tf-speech
,vision
]
-
name
:
Are GPUs recognized by our DL frameworks
-
name
:
Are GPUs recognized by our DL frameworks
run
:
|
run
:
|
...
...
tests/test_modeling_beit.py
View file @
3772af49
...
@@ -414,6 +414,7 @@ def prepare_img():
...
@@ -414,6 +414,7 @@ def prepare_img():
return
image
return
image
@
require_torch
@
require_vision
@
require_vision
class
BeitModelIntegrationTest
(
unittest
.
TestCase
):
class
BeitModelIntegrationTest
(
unittest
.
TestCase
):
@
cached_property
@
cached_property
...
...
tests/test_modeling_deit.py
View file @
3772af49
...
@@ -391,6 +391,7 @@ def prepare_img():
...
@@ -391,6 +391,7 @@ def prepare_img():
return
image
return
image
@
require_torch
@
require_vision
@
require_vision
class
DeiTModelIntegrationTest
(
unittest
.
TestCase
):
class
DeiTModelIntegrationTest
(
unittest
.
TestCase
):
@
cached_property
@
cached_property
...
...
tests/test_modeling_tf_vit.py
View file @
3772af49
...
@@ -353,7 +353,7 @@ class TFViTModelTest(TFModelTesterMixin, unittest.TestCase):
...
@@ -353,7 +353,7 @@ class TFViTModelTest(TFModelTesterMixin, unittest.TestCase):
@
slow
@
slow
def
test_model_from_pretrained
(
self
):
def
test_model_from_pretrained
(
self
):
model
=
TFViTModel
.
from_pretrained
(
"google/vit-base-patch16-224"
,
from_pt
=
True
)
model
=
TFViTModel
.
from_pretrained
(
"google/vit-base-patch16-224"
)
self
.
assertIsNotNone
(
model
)
self
.
assertIsNotNone
(
model
)
...
@@ -363,6 +363,7 @@ def prepare_img():
...
@@ -363,6 +363,7 @@ def prepare_img():
return
image
return
image
@
require_tf
@
require_vision
@
require_vision
class
TFViTModelIntegrationTest
(
unittest
.
TestCase
):
class
TFViTModelIntegrationTest
(
unittest
.
TestCase
):
@
cached_property
@
cached_property
...
...
tests/test_modeling_vit.py
View file @
3772af49
...
@@ -331,6 +331,7 @@ def prepare_img():
...
@@ -331,6 +331,7 @@ def prepare_img():
return
image
return
image
@
require_torch
@
require_vision
@
require_vision
class
ViTModelIntegrationTest
(
unittest
.
TestCase
):
class
ViTModelIntegrationTest
(
unittest
.
TestCase
):
@
cached_property
@
cached_property
...
...
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