Update tiny models and pipeline tests (#23446)
* fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@ from transformers.utils import cached_property, is_torch_available, is_vision_av
|
||||
from ...test_backbone_common import BackboneTesterMixin
|
||||
from ...test_configuration_common import ConfigTester
|
||||
from ...test_modeling_common import ModelTesterMixin, _config_zero_init, floats_tensor, ids_tensor
|
||||
from ...test_pipeline_mixin import PipelineTesterMixin
|
||||
|
||||
|
||||
if is_torch_available():
|
||||
@@ -226,7 +227,7 @@ class FocalNetModelTester:
|
||||
|
||||
|
||||
@require_torch
|
||||
class FocalNetModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
class FocalNetModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
|
||||
all_model_classes = (
|
||||
(
|
||||
FocalNetModel,
|
||||
@@ -237,6 +238,11 @@ class FocalNetModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
if is_torch_available()
|
||||
else ()
|
||||
)
|
||||
pipeline_model_mapping = (
|
||||
{"feature-extraction": FocalNetModel, "image-classification": FocalNetForImageClassification}
|
||||
if is_torch_available()
|
||||
else {}
|
||||
)
|
||||
fx_compatible = False
|
||||
|
||||
test_pruning = False
|
||||
|
||||
Reference in New Issue
Block a user