From fe6328291b296f58a5772135880bcb85e429500c Mon Sep 17 00:00:00 2001 From: skaul Date: Sat, 21 Sep 2024 02:48:16 +0300 Subject: [PATCH] moving the file --- .../COCO => resource/img}/000000039769.png | Bin .../models/bridgetower/test_modeling_bridgetower.py | 2 +- .../tests/models/swin/test_modeling_swin.py | 2 +- .../tests/models/vit/test_modeling_vit.py | 2 +- tests/transformers/tests/utils/test_image_utils.py | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename tests/{fixtures/tests_samples/COCO => resource/img}/000000039769.png (100%) diff --git a/tests/fixtures/tests_samples/COCO/000000039769.png b/tests/resource/img/000000039769.png similarity index 100% rename from tests/fixtures/tests_samples/COCO/000000039769.png rename to tests/resource/img/000000039769.png diff --git a/tests/transformers/tests/models/bridgetower/test_modeling_bridgetower.py b/tests/transformers/tests/models/bridgetower/test_modeling_bridgetower.py index db339f6c1b..4602ae4145 100644 --- a/tests/transformers/tests/models/bridgetower/test_modeling_bridgetower.py +++ b/tests/transformers/tests/models/bridgetower/test_modeling_bridgetower.py @@ -520,7 +520,7 @@ def test_inputs_embeds(self): # We will verify our results on an image of cute cats def prepare_img(): - image = Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png") + image = Image.open("tests/resource/img/000000039769.png") return image diff --git a/tests/transformers/tests/models/swin/test_modeling_swin.py b/tests/transformers/tests/models/swin/test_modeling_swin.py index da5f6204b1..fcc644ceb2 100644 --- a/tests/transformers/tests/models/swin/test_modeling_swin.py +++ b/tests/transformers/tests/models/swin/test_modeling_swin.py @@ -494,7 +494,7 @@ def test_inference_image_classification_head(self): model = SwinForImageClassification.from_pretrained("microsoft/swin-tiny-patch4-window7-224").to(torch_device) image_processor = self.default_image_processor - image = Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png") + image = Image.open("./tests/resource/img/000000039769.png") inputs = image_processor(images=image, return_tensors="pt").to(torch_device) # forward pass diff --git a/tests/transformers/tests/models/vit/test_modeling_vit.py b/tests/transformers/tests/models/vit/test_modeling_vit.py index 291abecef2..906f70f911 100644 --- a/tests/transformers/tests/models/vit/test_modeling_vit.py +++ b/tests/transformers/tests/models/vit/test_modeling_vit.py @@ -251,7 +251,7 @@ def test_model_from_pretrained(self): # We will verify our results on an image of cute cats def prepare_img(): - image = Image.open("./tests/fixtures/tests_samples/COCO/000000039769.png") + image = Image.open("./tests/resource/img/000000039769.png") return image diff --git a/tests/transformers/tests/utils/test_image_utils.py b/tests/transformers/tests/utils/test_image_utils.py index a5efb87c03..426afea11c 100644 --- a/tests/transformers/tests/utils/test_image_utils.py +++ b/tests/transformers/tests/utils/test_image_utils.py @@ -491,7 +491,7 @@ def test_load_img_url_timeout(self): load_image(INVOICE_URL, timeout=0.001) def test_load_img_local(self): - img = load_image("./tests/fixtures/tests_samples/COCO/000000039769.png") + img = load_image("./tests/resource/img/000000039769.png") img_arr = np.array(img) self.assertEqual(