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
d71f5b3e
"test/vscode:/vscode.git/clone" did not exist on "34c286b8115e2b5812f6271a2c102eba88bba45b"
Unverified
Commit
d71f5b3e
authored
Apr 10, 2024
by
Matt
Committed by
GitHub
Apr 10, 2024
Browse files
Update config class check in auto factory (#29854)
parent
f569172f
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 @
d71f5b3e
...
...
@@ -579,7 +579,7 @@ class _BaseAutoModelClass:
model_class ([`PreTrainedModel`]):
The model to register.
"""
if
hasattr
(
model_class
,
"config_class"
)
and
model_class
.
config_class
!=
config_class
:
if
hasattr
(
model_class
,
"config_class"
)
and
str
(
model_class
.
config_class
)
!=
str
(
config_class
)
:
raise
ValueError
(
"The model class you are passing has a `config_class` attribute that is not consistent with the "
f
"config class you passed (model has
{
model_class
.
config_class
}
and you passed
{
config_class
}
. Fix "
...
...
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