Delete deprecated stuff (#38838)
* delete deprecated stuff * fix copies * remove unused tests * fix modernbert and fuyu * Update src/transformers/cache_utils.py Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com> * bye bye `seen_tokens` * address comments * update typings * ecnoder decoder models follow same pattern as whisper * fix copies * why is it set to False? * fix switch transformers * fix encoder decoder models shared weight * fix copies and RAG * remove `next_cache` * fix gptj/git * fix copies * fix copies * style... * another forgotten docsrting --------- Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c6ee0b1da8
commit
bc161d5d06
@@ -2,8 +2,6 @@ import shutil
|
||||
import tempfile
|
||||
import unittest
|
||||
|
||||
import pytest
|
||||
|
||||
from transformers import Owlv2Processor
|
||||
from transformers.testing_utils import require_scipy
|
||||
|
||||
@@ -23,18 +21,3 @@ class Owlv2ProcessorTest(ProcessorTesterMixin, unittest.TestCase):
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
shutil.rmtree(cls.tmpdirname, ignore_errors=True)
|
||||
|
||||
def test_processor_query_images_positional(self):
|
||||
processor_components = self.prepare_components()
|
||||
processor = Owlv2Processor(**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()
|
||||
|
||||
@@ -232,21 +232,6 @@ 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