cleanup torch unittests (#6196)

* improve unit tests

this is a sample of one test according to the request in https://github.com/huggingface/transformers/issues/5973
before I apply it to the rest

* batch 1

* batch 2

* batch 3

* batch 4

* batch 5

* style

* non-tf template

* last deletion of check_loss_output
This commit is contained in:
Stas Bekman
2020-08-03 23:42:56 -07:00
committed by GitHub
parent b390a5672a
commit 5deed37f9f
18 changed files with 157 additions and 339 deletions

View File

@@ -95,9 +95,6 @@ class T5ModelTester:
lm_labels,
)
def check_loss_output(self, result):
self.parent.assertListEqual(list(result["loss"].size()), [])
def check_prepare_lm_labels_via_shift_left(
self, config, input_ids, decoder_input_ids, attention_mask, decoder_attention_mask, lm_labels,
):