mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-04 21:30:07 +06:00
Drop as_target_processor from the _call_ and pad methods (#38642)
Drop as_target_processor from _call_ and pad methods; reformat docstrings for readability
This commit is contained in:
parent
837ddac1ec
commit
25f711aa89
@ -81,10 +81,8 @@ class Wav2Vec2Processor(ProcessorMixin):
|
||||
**kwargs: Unpack[Wav2Vec2ProcessorKwargs],
|
||||
):
|
||||
"""
|
||||
When used in normal mode, this method forwards all its arguments to Wav2Vec2FeatureExtractor's
|
||||
[`~Wav2Vec2FeatureExtractor.__call__`] and returns its output. If used in the context
|
||||
[`~Wav2Vec2Processor.as_target_processor`] this method forwards all its arguments to PreTrainedTokenizer's
|
||||
[`~PreTrainedTokenizer.__call__`]. Please refer to the docstring of the above two methods for more information.
|
||||
This method forwards all its arguments to Wav2Vec2FeatureExtractor's
|
||||
[`~Wav2Vec2FeatureExtractor.__call__`] and returns its output.
|
||||
"""
|
||||
|
||||
if "raw_speech" in kwargs:
|
||||
@ -123,10 +121,8 @@ class Wav2Vec2Processor(ProcessorMixin):
|
||||
|
||||
def pad(self, *args, **kwargs):
|
||||
"""
|
||||
When used in normal mode, this method forwards all its arguments to Wav2Vec2FeatureExtractor's
|
||||
[`~Wav2Vec2FeatureExtractor.pad`] and returns its output. If used in the context
|
||||
[`~Wav2Vec2Processor.as_target_processor`] this method forwards all its arguments to PreTrainedTokenizer's
|
||||
[`~PreTrainedTokenizer.pad`]. Please refer to the docstring of the above two methods for more information.
|
||||
This method forwards all its arguments to Wav2Vec2FeatureExtractor's
|
||||
[`~Wav2Vec2FeatureExtractor.pad`] and returns its output.
|
||||
"""
|
||||
# For backward compatibility
|
||||
if self._in_target_context_manager:
|
||||
|
Loading…
Reference in New Issue
Block a user