From 941d42d960147179166c093e6f1981c5ae5b4305 Mon Sep 17 00:00:00 2001 From: wj-Mcat <1435130236@qq.com> Date: Mon, 26 Dec 2022 16:16:51 +0800 Subject: [PATCH] update modeling --- tests/transformers/ernie/test_modeling.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/transformers/ernie/test_modeling.py b/tests/transformers/ernie/test_modeling.py index 25ccb886cc40..08bfa947b9f1 100644 --- a/tests/transformers/ernie/test_modeling.py +++ b/tests/transformers/ernie/test_modeling.py @@ -307,13 +307,6 @@ def create_and_check_for_token_classification( self.parent.assertEqual(result[0].shape, [self.batch_size, self.seq_length, self.num_classes]) - def check_old_attribute( - self, config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels - ): - model = ErnieModel(config) - model.eval() - assert model.num_classes == config.num_labels - def create_and_check_model_cache( self, config, input_ids, token_type_ids, input_mask, sequence_labels, token_labels, choice_labels ): @@ -436,10 +429,6 @@ def test_for_model_cache(self): config_and_inputs = self.model_tester.prepare_config_and_inputs() self.model_tester.create_and_check_model_cache(*config_and_inputs) - def test_for_old_attribute(self): - config_and_inputs = self.model_tester.prepare_config_and_inputs() - self.model_tester.check_old_attribute(*config_and_inputs) - @slow def test_model_from_pretrained(self): for model_name in list(ErniePretrainedModel.pretrained_init_configuration)[:1]: