From e9368c304964e4c182ffacdd3ca1c4750a82d6b8 Mon Sep 17 00:00:00 2001 From: Sadra Barikbin Date: Mon, 19 Feb 2024 13:19:34 +0330 Subject: [PATCH] Update base.py --- src/transformers/pipelines/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/transformers/pipelines/base.py b/src/transformers/pipelines/base.py index 9f30665e590d7d..758484107b76f2 100644 --- a/src/transformers/pipelines/base.py +++ b/src/transformers/pipelines/base.py @@ -1048,9 +1048,9 @@ def check_model_type(self, supported_models: Union[List[str], dict]): def _sanitize_parameters(self, **pipeline_parameters): """ _sanitize_parameters will be called with any excessive named arguments from either `__init__` or `__call__` - methods. It should return 3 dictionnaries of the resolved parameters used by the various `preprocess`, - `forward` and `postprocess` methods. Do not fill dictionnaries if the caller didn't specify a kwargs. This - let's you keep defaults in function signatures, which is more "natural". + methods. It should return 3 dictionaries of the resolved parameters used by the various `preprocess`, + `forward` and `postprocess` methods. Do not fill dictionaries if the caller didn't specify a kwargs. This + lets you keep defaults in function signatures, which is more "natural". It is not meant to be called directly, it will be automatically called and the final parameters resolved by `__init__` and `__call__`