Purge unused ModelTester code (#37085)

* Purge correctly this time

* Remove more methods from recent PRs

* make fixup
This commit is contained in:
Matt
2025-04-03 17:48:35 +01:00
committed by GitHub
parent 1b29409d89
commit 2d46a08b63
72 changed files with 3 additions and 4286 deletions

View File

@@ -259,33 +259,6 @@ class RoCBertModelTester:
)
self.parent.assertEqual(result.last_hidden_state.shape, (self.batch_size, self.seq_length, self.hidden_size))
def create_and_check_for_causal_lm(
self,
config,
input_ids,
input_shape_ids,
input_pronunciation_ids,
token_type_ids,
input_mask,
sequence_labels,
token_labels,
choice_labels,
encoder_hidden_states,
encoder_attention_mask,
):
model = RoCBertForCausalLM(config=config)
model.to(torch_device)
model.eval()
result = model(
input_ids,
input_shape_ids=input_shape_ids,
input_pronunciation_ids=input_pronunciation_ids,
attention_mask=input_mask,
token_type_ids=token_type_ids,
labels=token_labels,
)
self.parent.assertEqual(result.logits.shape, (self.batch_size, self.seq_length, self.vocab_size))
def create_and_check_for_masked_lm(
self,
config,