Browse Source

fix(fastrun): fallback when redis config is empty

GitOrigin-RevId: b61630d007
tags/v1.8.0
Megvii Engine Team 3 years ago
parent
commit
bac8cc48ee
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      imperative/python/megengine/utils/persistent_cache.py

+ 7
- 6
imperative/python/megengine/utils/persistent_cache.py View File

@@ -34,12 +34,13 @@ class PersistentCacheOnServer(_PersistentCache):
"in-file cache".format(exc)
)
else:
self.add_config(
"redis",
redis_config,
"fastrun use redis cache",
"failed to connect to cache server",
)
if redis_config is not None:
self.add_config(
"redis",
redis_config,
"fastrun use redis cache",
"failed to connect to cache server",
)
if cache_type != "MEMORY":
path = self.get_cache_file(self.get_cache_dir())
self.add_config(


Loading…
Cancel
Save