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
9ff672fc
Commit
9ff672fc
authored
Jul 24, 2021
by
Lysandre
Browse files
BaseLazyModule -> LazyModule in RemBERT
parent
434022ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
src/transformers/models/rembert/__init__.py
src/transformers/models/rembert/__init__.py
+2
-15
No files found.
src/transformers/models/rembert/__init__.py
View file @
9ff672fc
...
...
@@ -19,7 +19,7 @@
from
typing
import
TYPE_CHECKING
from
...file_utils
import
(
_
Base
LazyModule
,
_LazyModule
,
is_sentencepiece_available
,
is_tf_available
,
is_tokenizers_available
,
...
...
@@ -108,19 +108,6 @@ if TYPE_CHECKING:
else
:
import
importlib
import
os
import
sys
class
_LazyModule
(
_BaseLazyModule
):
"""
Module class that surfaces all objects but only performs associated imports when the objects are requested.
"""
__file__
=
globals
()[
"__file__"
]
__path__
=
[
os
.
path
.
dirname
(
__file__
)]
def
_get_module
(
self
,
module_name
:
str
):
return
importlib
.
import_module
(
"."
+
module_name
,
self
.
__name__
)
sys
.
modules
[
__name__
]
=
_LazyModule
(
__name__
,
_import_structure
)
sys
.
modules
[
__name__
]
=
_LazyModule
(
__name__
,
globals
()[
"__file__"
],
_import_structure
)
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