* remove tf/flax * fix * style * Update add_new_model_like.py * work in progress * continue * more cleanup * simplify and first final version * fixes -> it works * add linter checks * Update add_new_model_like.py * fix * add modular conversion at the end * Update add_new_model_like.py * add video processor * Update add_new_model_like.py * Update add_new_model_like.py * Update add_new_model_like.py * fix * Update image_processing_auto.py * Update image_processing_auto.py * fix post rebase * start test filenames replacement * rename all test_processor -> test_processing * fix copied from * add docstrings * Update add_new_model_like.py * fix regex * improve wording * Update add_new_model_like.py * Update add_new_model_like.py * Update add_new_model_like.py * start adding test * fix * fix * proper first test * tests * fix * fix * fix * fix * modular can be used from anywhere * protect import * fix * Update add_new_model_like.py * fix
24 lines
656 B
Python
24 lines
656 B
Python
import shutil
|
|
import tempfile
|
|
import unittest
|
|
|
|
from transformers import Owlv2Processor
|
|
from transformers.testing_utils import require_scipy
|
|
|
|
from ...test_processing_common import ProcessorTesterMixin
|
|
|
|
|
|
@require_scipy
|
|
class Owlv2ProcessorTest(ProcessorTesterMixin, unittest.TestCase):
|
|
processor_class = Owlv2Processor
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
cls.tmpdirname = tempfile.mkdtemp()
|
|
processor = cls.processor_class.from_pretrained("google/owlv2-base-patch16-ensemble")
|
|
processor.save_pretrained(cls.tmpdirname)
|
|
|
|
@classmethod
|
|
def tearDownClass(cls):
|
|
shutil.rmtree(cls.tmpdirname, ignore_errors=True)
|