Fix argument label (#4792)

* Fix argument label

* Fix test
This commit is contained in:
Sylvain Gugger
2020-06-05 15:20:29 -04:00
committed by GitHub
parent 3723f30a18
commit 4dd5cf2207
2 changed files with 3 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ class DataCollatorForLanguageModeling(DataCollator):
batch = self._tensorize_batch(examples)
if self.mlm:
inputs, labels = self.mask_tokens(batch)
return {"input_ids": inputs, "masked_lm_labels": labels}
return {"input_ids": inputs, "labels": labels}
else:
return {"input_ids": batch, "labels": batch}