Commit 9ff672fc authored by Lysandre's avatar Lysandre
Browse files

BaseLazyModule -> LazyModule in RemBERT

parent 434022ad
......@@ -19,7 +19,7 @@
from typing import TYPE_CHECKING
from ...file_utils import (
_BaseLazyModule,
_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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment