Skip to content

Commit

Permalink
Remove masked_lm_labels from returned dictionary (huggingface#7818)
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje authored Oct 16, 2020
1 parent 96e47d9 commit c6e865a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/transformers/data/data_collator.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,6 @@ def __call__(self, examples: List[Dict[str, torch.Tensor]]) -> Dict[str, torch.T
"labels": mlm_labels if self.mlm else None,
"next_sentence_label": torch.tensor(nsp_labels),
}
if self.mlm:
result["masked_lm_labels"] = mlm_labels
return result

def _tensorize_batch(self, examples: List[torch.Tensor]) -> torch.Tensor:
Expand Down

0 comments on commit c6e865a

Please sign in to comment.