Modify ProcessorTesterMixin for better generalization (#32637)

* Add padding="max_length" to tokenizer kwargs and change crop_size to size for image_processor kwargs

* remove crop_size argument in align processor tests to be coherent with base tests

* Add pad_token when loading tokenizer if needed, change test override tokenizer kwargs, remove unnecessary test overwrites in grounding dino
This commit is contained in:
Yoni Gozlan
2024-08-13 11:48:53 -04:00
committed by GitHub
parent c3cd9d807e
commit 5bcbdff159
3 changed files with 18 additions and 190 deletions

View File

@@ -66,8 +66,6 @@ class AlignProcessorTest(ProcessorTesterMixin, unittest.TestCase):
image_processor_map = {
"do_resize": True,
"size": 20,
"do_center_crop": True,
"crop_size": 18,
"do_normalize": True,
"image_mean": [0.48145466, 0.4578275, 0.40821073],
"image_std": [0.26862954, 0.26130258, 0.27577711],