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
69038ce0
Unverified
Commit
69038ce0
authored
Dec 08, 2022
by
Sylvain Gugger
Committed by
GitHub
Dec 08, 2022
Browse files
Whilelist Transformers private method in DummyObject (#20681)
parent
9cc65f87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/utils/import_utils.py
src/transformers/utils/import_utils.py
+1
-1
No files found.
src/transformers/utils/import_utils.py
View file @
69038ce0
...
@@ -1013,7 +1013,7 @@ class DummyObject(type):
...
@@ -1013,7 +1013,7 @@ class DummyObject(type):
"""
"""
def
__getattribute__
(
cls
,
key
):
def
__getattribute__
(
cls
,
key
):
if
key
.
startswith
(
"_"
):
if
key
.
startswith
(
"_"
)
and
key
!=
"_from_config"
:
return
super
().
__getattribute__
(
key
)
return
super
().
__getattribute__
(
key
)
requires_backends
(
cls
,
cls
.
_backends
)
requires_backends
(
cls
,
cls
.
_backends
)
...
...
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