Skip to content

Commit

Permalink
[doc prepare_seq2seq_batch] fix docs (huggingface#8013)
Browse files Browse the repository at this point in the history
  • Loading branch information
patil-suraj authored Oct 24, 2020
1 parent 00602f7 commit 38f6739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/transformers/tokenization_bart.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def prepare_seq2seq_batch(
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model.
- **labels** -- List of token ids for tgt_texts
The full set of keys ``[input_ids, attention_mask, decoder_input_ids, decoder_attention_mask]``,
The full set of keys ``[input_ids, attention_mask, labels]``,
will only be returned if tgt_texts is passed. Otherwise, input_ids, attention_mask will be the only keys.
"""
kwargs.pop("src_lang", None)
Expand Down
6 changes: 2 additions & 4 deletions src/transformers/tokenization_utils_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,11 +1364,9 @@ def all_special_ids(self) -> List[int]:
- **input_ids** -- List of token ids to be fed to the encoder.
- **attention_mask** -- List of indices specifying which tokens should be attended to by the model.
- **decoder_input_ids** -- List of token ids to be fed to the decoder.
- **decoder_attention_mask** -- List of indices specifying which tokens should be attended to by the decoder.
This does not include causal mask, which is built by the model.
- **labels** -- List of token ids for tgt_texts.
The full set of keys ``[input_ids, attention_mask, decoder_input_ids, decoder_attention_mask]``,
The full set of keys ``[input_ids, attention_mask, labels]``,
will only be returned if tgt_texts is passed. Otherwise, input_ids, attention_mask will be the only keys.
"""
Expand Down

0 comments on commit 38f6739

Please sign in to comment.