From 6395d1227fa709f9577db73e164e0fd3a8ac67f5 Mon Sep 17 00:00:00 2001 From: Fei Wang Date: Sat, 24 Sep 2022 02:35:19 +0800 Subject: [PATCH] Fixed type hint for pipelines/check_task (#19150) --- src/transformers/pipelines/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transformers/pipelines/__init__.py b/src/transformers/pipelines/__init__.py index fa2b4fb244b..da0f3d4d83f 100755 --- a/src/transformers/pipelines/__init__.py +++ b/src/transformers/pipelines/__init__.py @@ -385,7 +385,7 @@ def get_task(model: str, use_auth_token: Optional[str] = None) -> str: return task -def check_task(task: str) -> Tuple[Dict, Any]: +def check_task(task: str) -> Tuple[str, Dict, Any]: """ Checks an incoming task string, to validate it's correct and return the default Pipeline and Model classes, and default models if they exist.