Replace (TF)CommonTestCases for modeling with a mixin.
I suspect the wrapper classes were created in order to prevent the abstract base class (TF)CommonModelTester from being included in test discovery and running, because that would fail. I solved this by replacing the abstract base class with a mixin. Code changes are just de-indenting and automatic reformattings performed by black to use the extra line space.
This commit is contained in:
@@ -19,7 +19,7 @@ import unittest
|
||||
from transformers import RobertaConfig, is_tf_available
|
||||
|
||||
from .test_configuration_common import ConfigTester
|
||||
from .test_modeling_tf_common import TFCommonTestCases, ids_tensor
|
||||
from .test_modeling_tf_common import TFModelTesterMixin, ids_tensor
|
||||
from .utils import CACHE_DIR, require_tf, slow
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ if is_tf_available():
|
||||
|
||||
|
||||
@require_tf
|
||||
class TFRobertaModelTest(TFCommonTestCases.TFCommonModelTester):
|
||||
class TFRobertaModelTest(TFModelTesterMixin, unittest.TestCase):
|
||||
|
||||
all_model_classes = (
|
||||
(TFRobertaModel, TFRobertaForMaskedLM, TFRobertaForSequenceClassification) if is_tf_available() else ()
|
||||
|
||||
Reference in New Issue
Block a user