Skip to content

Commit

Permalink
Update FillMaskPipeline.__call__ signature and docstring (#35006)
Browse files Browse the repository at this point in the history
Update `FillMaskPipeline.__call__`

- Remove unused `*args`
- Update docstring with `inputs` over `args`
  • Loading branch information
alvarobartt authored Nov 29, 2024
1 parent f7427f5 commit 19dabe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transformers/pipelines/fill_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 19dabe9

Please sign in to comment.