Skip to content

Commit 9fc7817

Browse files
committed
add import redis func
1 parent a76d8d6 commit 9fc7817

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

modelcache/manager/vector_data/redis.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66

77
import numpy as np
88
from modelcache.manager.vector_data.base import VectorBase, VectorData
9-
# from modelcache.utils import import_redis
9+
from modelcache.utils import import_redis
1010
# from modelcache.utils.log import gptcache_log
1111

12-
# import_redis()
12+
import_redis()
1313
#
14-
# # pylint: disable=C0413
1514
# from redis.commands.search.indexDefinition import IndexDefinition, IndexType
1615
# from redis.commands.search.query import Query
1716
# from redis.commands.search.field import TagField, VectorField

modelcache/utils/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,8 @@ def import_timm():
6969

7070
def import_pillow():
7171
_check_library("PIL", package="pillow")
72+
73+
74+
def import_redis():
75+
_check_library("redis")
76+
_check_library("redis_om")

0 commit comments

Comments
 (0)