mirror of
https://github.com/saymrwulf/transformers.git
synced 2026-05-14 20:58:08 +00:00
[Tests] Improve vision tests (#14458)
* Improve tests * Install vision for tf tests
This commit is contained in:
parent
f2e90bcb8f
commit
3772af49ce
6 changed files with 9 additions and 5 deletions
|
|
@ -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:
|
||||
|
|
@ -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:
|
||||
|
|
|
|||
4
.github/workflows/self-scheduled.yml
vendored
4
.github/workflows/self-scheduled.yml
vendored
|
|
@ -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: |
|
||||
|
|
@ -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: |
|
||||
|
|
|
|||
|
|
@ -414,6 +414,7 @@ def prepare_img():
|
|||
return image
|
||||
|
||||
|
||||
@require_torch
|
||||
@require_vision
|
||||
class BeitModelIntegrationTest(unittest.TestCase):
|
||||
@cached_property
|
||||
|
|
|
|||
|
|
@ -391,6 +391,7 @@ def prepare_img():
|
|||
return image
|
||||
|
||||
|
||||
@require_torch
|
||||
@require_vision
|
||||
class DeiTModelIntegrationTest(unittest.TestCase):
|
||||
@cached_property
|
||||
|
|
|
|||
|
|
@ -353,7 +353,7 @@ class TFViTModelTest(TFModelTesterMixin, unittest.TestCase):
|
|||
@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)
|
||||
|
||||
|
||||
|
|
@ -363,6 +363,7 @@ def prepare_img():
|
|||
return image
|
||||
|
||||
|
||||
@require_tf
|
||||
@require_vision
|
||||
class TFViTModelIntegrationTest(unittest.TestCase):
|
||||
@cached_property
|
||||
|
|
|
|||
|
|
@ -331,6 +331,7 @@ def prepare_img():
|
|||
return image
|
||||
|
||||
|
||||
@require_torch
|
||||
@require_vision
|
||||
class ViTModelIntegrationTest(unittest.TestCase):
|
||||
@cached_property
|
||||
|
|
|
|||
Loading…
Reference in a new issue