Skip to content

Commit

Permalink
update modeling
Browse files Browse the repository at this point in the history
  • Loading branch information
wj-Mcat committed Dec 26, 2022
1 parent b417b75 commit 941d42d
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tests/transformers/ernie/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
):
Expand Down Expand Up @@ -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]:
Expand Down

0 comments on commit 941d42d

Please sign in to comment.