Update tiny models and pipeline tests (#23446)
* fix --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
@@ -21,6 +21,7 @@ from transformers.testing_utils import is_torch_available, require_torch, tooslo
|
||||
from ...generation.test_utils import torch_device
|
||||
from ...test_configuration_common import ConfigTester
|
||||
from ...test_modeling_common import ModelTesterMixin, ids_tensor
|
||||
from ...test_pipeline_mixin import PipelineTesterMixin
|
||||
|
||||
|
||||
if is_torch_available():
|
||||
@@ -133,8 +134,11 @@ class CpmAntModelTester:
|
||||
|
||||
|
||||
@require_torch
|
||||
class CpmAntModelTest(ModelTesterMixin, unittest.TestCase):
|
||||
class CpmAntModelTest(ModelTesterMixin, PipelineTesterMixin, unittest.TestCase):
|
||||
all_model_classes = (CpmAntModel, CpmAntForCausalLM) if is_torch_available() else ()
|
||||
pipeline_model_mapping = (
|
||||
{"feature-extraction": CpmAntModel, "text-generation": CpmAntForCausalLM} if is_torch_available() else {}
|
||||
)
|
||||
|
||||
test_pruning = False
|
||||
test_missing_keys = False
|
||||
|
||||
Reference in New Issue
Block a user