Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/transformers/tokenization_marian.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import sentencepiece

from .file_utils import add_start_docstrings_to_callable
from .file_utils import add_start_docstrings
from .tokenization_utils import BatchEncoding, PreTrainedTokenizer
from .tokenization_utils_base import PREPARE_SEQ2SEQ_BATCH_DOCSTRING

Expand Down Expand Up @@ -125,7 +125,7 @@ def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None) -> Lis
# We don't expect to process pairs, but leave the pair logic for API consistency
return token_ids_0 + token_ids_1 + [self.eos_token_id]

@add_start_docstrings_to_callable(PREPARE_SEQ2SEQ_BATCH_DOCSTRING)
@add_start_docstrings(PREPARE_SEQ2SEQ_BATCH_DOCSTRING)
def prepare_seq2seq_batch(
self,
src_texts: List[str],
Expand Down
4 changes: 2 additions & 2 deletions src/transformers/tokenization_mbart.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from typing import List, Optional

from .file_utils import add_start_docstrings_to_callable
from .file_utils import add_start_docstrings
from .tokenization_utils import BatchEncoding
from .tokenization_utils_base import PREPARE_SEQ2SEQ_BATCH_DOCSTRING
from .tokenization_xlm_roberta import XLMRobertaTokenizer
Expand Down Expand Up @@ -156,7 +156,7 @@ def build_inputs_with_special_tokens(
# We don't expect to process pairs, but leave the pair logic for API consistency
return self.prefix_tokens + token_ids_0 + token_ids_1 + self.suffix_tokens

@add_start_docstrings_to_callable(PREPARE_SEQ2SEQ_BATCH_DOCSTRING)
@add_start_docstrings(PREPARE_SEQ2SEQ_BATCH_DOCSTRING)
def prepare_seq2seq_batch(
self,
src_texts: List[str],
Expand Down
4 changes: 2 additions & 2 deletions src/transformers/tokenization_pegasus.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from transformers.tokenization_reformer import ReformerTokenizer

from .file_utils import add_start_docstrings_to_callable
from .file_utils import add_start_docstrings
from .tokenization_utils_base import PREPARE_SEQ2SEQ_BATCH_DOCSTRING, BatchEncoding


Expand Down Expand Up @@ -104,7 +104,7 @@ def build_inputs_with_special_tokens(self, token_ids_0, token_ids_1=None) -> Lis
# We don't expect to process pairs, but leave the pair logic for API consistency
return token_ids_0 + token_ids_1 + [self.eos_token_id]

@add_start_docstrings_to_callable(PREPARE_SEQ2SEQ_BATCH_DOCSTRING)
@add_start_docstrings(PREPARE_SEQ2SEQ_BATCH_DOCSTRING)
def prepare_seq2seq_batch(
self,
src_texts: List[str],
Expand Down