Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
ae6ce28f
"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "e93ccb3290ec4fb0076495c86af9de33f27048bd"
Unverified
Commit
ae6ce28f
authored
Jun 01, 2021
by
Lysandre Debut
Committed by
GitHub
Jun 01, 2021
Browse files
Authorize args when instantiating an AutoModel (#11956)
parent
fcad8018
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/models/auto/auto_factory.py
src/transformers/models/auto/auto_factory.py
+1
-1
No files found.
src/transformers/models/auto/auto_factory.py
View file @
ae6ce28f
...
@@ -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 "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment