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
10 changes: 5 additions & 5 deletions src/transformers/models/donut/processing_donut.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class DonutProcessor(ProcessorMixin):
Constructs a Donut processor which wraps a Donut image processor and an XLMRoBERTa tokenizer into a single
processor.

[`DonutProcessor`] offers all the functionalities of [`DonutFeatureExtractor`] and
[`DonutProcessor`] offers all the functionalities of [`DonutImageProcessor`] and
[`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. See the [`~DonutProcessor.__call__`] and
[`~DonutProcessor.decode`] for more information.

Args:
image_processor ([`DonutFeatureExtractor`]):
An instance of [`DonutFeatureExtractor`]. The image processor is a required input.
image_processor ([`DonutImageProcessor`]):
An instance of [`DonutImageProcessor`]. The image processor is a required input.
tokenizer ([`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]):
An instance of [`XLMRobertaTokenizer`/`XLMRobertaTokenizerFast`]. The tokenizer is a required input.
"""
Expand Down Expand Up @@ -62,8 +62,8 @@ def __init__(self, image_processor=None, tokenizer=None, **kwargs):

def __call__(self, *args, **kwargs):
"""
When used in normal mode, this method forwards all its arguments to AutoFeatureExtractor's
[`~AutoFeatureExtractor.__call__`] and returns its output. If used in the context
When used in normal mode, this method forwards all its arguments to AutoImageProcessor's
[`~AutoImageProcessor.__call__`] and returns its output. If used in the context
[`~DonutProcessor.as_target_processor`] this method forwards all its arguments to DonutTokenizer's
[`~DonutTokenizer.__call__`]. Please refer to the doctsring of the above two methods for more information.
"""
Expand Down
8 changes: 4 additions & 4 deletions src/transformers/models/flava/processing_flava.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ class FlavaProcessor(ProcessorMixin):
r"""
Constructs a FLAVA processor which wraps a FLAVA image processor and a FLAVA tokenizer into a single processor.

[`FlavaProcessor`] offers all the functionalities of [`FlavaFeatureExtractor`] and [`BertTokenizerFast`]. See the
[`FlavaProcessor`] offers all the functionalities of [`FlavaImageProcessor`] and [`BertTokenizerFast`]. See the
[`~FlavaProcessor.__call__`] and [`~FlavaProcessor.decode`] for more information.

Args:
image_processor ([`FlavaFeatureExtractor`]): The image processor is a required input.
image_processor ([`FlavaImageProcessor`]): The image processor is a required input.
tokenizer ([`BertTokenizerFast`]): The tokenizer is a required input.
"""
attributes = ["image_processor", "tokenizer"]
image_processor_class = "FlavaFeatureExtractor"
image_processor_class = "FlavaImageProcessor"
tokenizer_class = ("BertTokenizer", "BertTokenizerFast")

def __init__(self, image_processor=None, tokenizer=None, **kwargs):
Expand Down Expand Up @@ -81,7 +81,7 @@ def __call__(
**kwargs
):
"""
This method uses [`FLAVAFeatureExtractor.__call__`] method to prepare image(s) for the model, and
This method uses [`FlavaImageProcessor.__call__`] method to prepare image(s) for the model, and
[`BertTokenizerFast.__call__`] to prepare text for the model.

Please refer to the docstring of the above two methods for more information.
Expand Down
10 changes: 5 additions & 5 deletions src/transformers/models/vilt/processing_vilt.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ class ViltProcessor(ProcessorMixin):
r"""
Constructs a ViLT processor which wraps a BERT tokenizer and ViLT image processor into a single processor.

[`ViltProcessor`] offers all the functionalities of [`ViltFeatureExtractor`] and [`BertTokenizerFast`]. See the
[`ViltProcessor`] offers all the functionalities of [`ViltImageProcessor`] and [`BertTokenizerFast`]. See the
docstring of [`~ViltProcessor.__call__`] and [`~ViltProcessor.decode`] for more information.

Args:
image_processor (`ViltFeatureExtractor`):
An instance of [`ViltFeatureExtractor`]. The image processor is a required input.
image_processor (`ViltImageProcessor`):
An instance of [`ViltImageProcessor`]. The image processor is a required input.
tokenizer (`BertTokenizerFast`):
An instance of ['BertTokenizerFast`]. The tokenizer is a required input.
"""
attributes = ["image_processor", "tokenizer"]
image_processor_class = "ViltFeatureExtractor"
image_processor_class = "ViltImageProcessor"
tokenizer_class = ("BertTokenizer", "BertTokenizerFast")

def __init__(self, image_processor=None, tokenizer=None, **kwargs):
Expand Down Expand Up @@ -80,7 +80,7 @@ def __call__(
**kwargs
) -> BatchEncoding:
"""
This method uses [`ViltFeatureExtractor.__call__`] method to prepare image(s) for the model, and
This method uses [`ViltImageProcessor.__call__`] method to prepare image(s) for the model, and
[`BertTokenizerFast.__call__`] to prepare text for the model.

Please refer to the docstring of the above two methods for more information.
Expand Down