From 19dabe96362803fb0a9ae7073d03533966598b17 Mon Sep 17 00:00:00 2001 From: Alvaro Bartolome <36760800+alvarobartt@users.noreply.github.com> Date: Fri, 29 Nov 2024 14:44:56 +0100 Subject: [PATCH] Update `FillMaskPipeline.__call__` signature and docstring (#35006) Update `FillMaskPipeline.__call__` - Remove unused `*args` - Update docstring with `inputs` over `args` --- src/transformers/pipelines/fill_mask.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformers/pipelines/fill_mask.py b/src/transformers/pipelines/fill_mask.py index a572a1642ab617..c14f54118486b9 100644 --- a/src/transformers/pipelines/fill_mask.py +++ b/src/transformers/pipelines/fill_mask.py @@ -245,12 +245,12 @@ def _sanitize_parameters(self, top_k=None, targets=None, tokenizer_kwargs=None): ) return preprocess_params, {}, postprocess_params - def __call__(self, inputs, *args, **kwargs): + def __call__(self, inputs, **kwargs): """ Fill the masked token in the text(s) given as inputs. Args: - args (`str` or `List[str]`): + inputs (`str` or `List[str]`): One or several texts (or one list of prompts) with masked tokens. targets (`str` or `List[str]`, *optional*): When passed, the model will limit the scores to the passed targets instead of looking up in the whole