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
491a33d1
Unverified
Commit
491a33d1
authored
Dec 30, 2022
by
Matthew McDermott
Committed by
GitHub
Dec 30, 2022
Browse files
Adds type checking to PreTrainedConfig. (#20926)
parent
8637316e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/configuration_utils.py
src/transformers/configuration_utils.py
+1
-1
No files found.
src/transformers/configuration_utils.py
View file @
491a33d1
...
...
@@ -732,7 +732,7 @@ class PretrainedConfig(PushToHubMixin):
return
json
.
loads
(
text
)
def
__eq__
(
self
,
other
):
return
self
.
__dict__
==
other
.
__dict__
return
isinstance
(
other
,
PretrainedConfig
)
and
(
self
.
__dict__
==
other
.
__dict__
)
def
__repr__
(
self
):
return
f
"
{
self
.
__class__
.
__name__
}
{
self
.
to_json_string
()
}
"
...
...
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