提交 31705913 编写于 作者: M Megvii Engine Team

fix(ci): set MGE_FASTRUN_CACHE_TYPE=FILE in ci env

GitOrigin-RevId: c4a549480e2e44cd51a48972fb38ff8f31f237ac
上级 f814a4ae
...@@ -19,6 +19,8 @@ from ..version import __version__ ...@@ -19,6 +19,8 @@ from ..version import __version__
class _FakeRedisConn: class _FakeRedisConn:
cache_file = None
def __init__(self): def __init__(self):
try: try:
from ..hub.hub import _get_megengine_home from ..hub.hub import _get_megengine_home
...@@ -27,8 +29,8 @@ class _FakeRedisConn: ...@@ -27,8 +29,8 @@ class _FakeRedisConn:
os.path.join(_get_megengine_home(), "persistent_cache") os.path.join(_get_megengine_home(), "persistent_cache")
) )
os.makedirs(cache_dir, exist_ok=True) os.makedirs(cache_dir, exist_ok=True)
cache_file = os.path.join(cache_dir, "cache") self.cache_file = os.path.join(cache_dir, "cache")
self._dict = shelve.open(cache_file) self._dict = shelve.open(self.cache_file)
self._is_shelve = True self._is_shelve = True
except: except:
self._dict = {} self._dict = {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册