"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e93ccb3290ec4fb0076495c86af9de33f27048bd"
Unverified Commit ae6ce28f authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Authorize args when instantiating an AutoModel (#11956)

parent fcad8018
...@@ -357,7 +357,7 @@ class _BaseAutoModelClass: ...@@ -357,7 +357,7 @@ class _BaseAutoModelClass:
# Base class for auto models. # Base class for auto models.
_model_mapping = None _model_mapping = None
def __init__(self): def __init__(self, *args, **kwargs):
raise EnvironmentError( raise EnvironmentError(
f"{self.__class__.__name__} is designed to be instantiated " f"{self.__class__.__name__} is designed to be instantiated "
f"using the `{self.__class__.__name__}.from_pretrained(pretrained_model_name_or_path)` or " f"using the `{self.__class__.__name__}.from_pretrained(pretrained_model_name_or_path)` or "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment