Uniformize OwlViT and Owlv2 processors (#35700)
* uniformize owlvit processor * uniformize owlv2 * nit * add positional arg test owlvit * run-slow: owlvit, owlv2 * run-slow: owlvit, owlv2 * remove one letter variable
This commit is contained in:
@@ -232,6 +232,21 @@ class OwlViTProcessorTest(ProcessorTesterMixin, unittest.TestCase):
|
||||
with pytest.raises(ValueError):
|
||||
processor()
|
||||
|
||||
def test_processor_query_images_positional(self):
|
||||
processor_components = self.prepare_components()
|
||||
processor = OwlViTProcessor(**processor_components)
|
||||
|
||||
image_input = self.prepare_image_inputs()
|
||||
query_images = self.prepare_image_inputs()
|
||||
|
||||
inputs = processor(None, image_input, query_images)
|
||||
|
||||
self.assertListEqual(list(inputs.keys()), ["query_pixel_values", "pixel_values"])
|
||||
|
||||
# test if it raises when no input is passed
|
||||
with pytest.raises(ValueError):
|
||||
processor()
|
||||
|
||||
def test_tokenizer_decode(self):
|
||||
image_processor = self.get_image_processor()
|
||||
tokenizer = self.get_tokenizer()
|
||||
|
||||
Reference in New Issue
Block a user