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

[Tests] Improve vision tests #14458

Merged
merged 2 commits into from
Nov 24, 2021
Merged
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
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ jobs:
- v0.4-tf-{{ checksum "setup.py" }}
- v0.4-{{ checksum "setup.py" }}
- 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:
key: v0.4-tf-{{ checksum "setup.py" }}
paths:
Expand Down Expand Up @@ -310,7 +310,7 @@ jobs:
- v0.4-tf-{{ checksum "setup.py" }}
- v0.4-{{ checksum "setup.py" }}
- 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:
key: v0.4-tf-{{ checksum "setup.py" }}
paths:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/self-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
run: |
apt -y update && apt install -y libsndfile1-dev git
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
run: |
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
run: |
apt -y update && apt install -y libsndfile1-dev git
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
run: |
Expand Down
1 change: 1 addition & 0 deletions tests/test_modeling_beit.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ def prepare_img():
return image


@require_torch
@require_vision
class BeitModelIntegrationTest(unittest.TestCase):
@cached_property
Expand Down
1 change: 1 addition & 0 deletions tests/test_modeling_deit.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ def prepare_img():
return image


@require_torch
@require_vision
class DeiTModelIntegrationTest(unittest.TestCase):
@cached_property
Expand Down
3 changes: 2 additions & 1 deletion tests/test_modeling_tf_vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def test_for_image_classification(self):
@slow
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)


Expand All @@ -363,6 +363,7 @@ def prepare_img():
return image


@require_tf
@require_vision
class TFViTModelIntegrationTest(unittest.TestCase):
@cached_property
Expand Down
1 change: 1 addition & 0 deletions tests/test_modeling_vit.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def prepare_img():
return image


@require_torch
@require_vision
class ViTModelIntegrationTest(unittest.TestCase):
@cached_property
Expand Down