Skip to content

Commit 21aaf6f

Browse files
committed
delete file
1 parent 62be825 commit 21aaf6f

File tree

21 files changed

+62
-742
lines changed

21 files changed

+62
-742
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ dmypy.json
135135
/embedding_npy
136136
/flask_server
137137
*.bin
138-
**/modelcache_serving.py
139138
**/maya_embedding_service
140139

141-
*.ini
140+
*.ini
141+
142+
multicache_serving.py

modelcache/core.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@ def init(
3535
cache_enable_func=cache_all,
3636
query_pre_embedding_func=None,
3737
insert_pre_embedding_func=None,
38-
mm_query_pre_embedding_func=None,
39-
mm_insert_pre_embedding_func=None,
4038
embedding_func=string_embedding,
41-
embedding_concurrent_func=string_embedding,
4239
data_manager: DataManager = get_data_manager(),
4340
similarity_evaluation=ExactMatchEvaluation(),
4441
post_process_messages_func=first,
@@ -49,10 +46,7 @@ def init(
4946
self.cache_enable_func = cache_enable_func
5047
self.query_pre_embedding_func = query_pre_embedding_func
5148
self.insert_pre_embedding_func = insert_pre_embedding_func
52-
self.mm_query_pre_embedding_func = mm_query_pre_embedding_func
53-
self.mm_insert_pre_embedding_func = mm_insert_pre_embedding_func
5449
self.embedding_func = embedding_func
55-
self.embedding_concurrent_func = embedding_concurrent_func
5650
self.data_manager: DataManager = data_manager
5751
self.similarity_evaluation = similarity_evaluation
5852
self.post_process_messages_func = post_process_messages_func

modelcache/manager/scalar_data/base.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,6 @@ class CacheStorage(metaclass=ABCMeta):
9494
def create(self):
9595
pass
9696

97-
@abstractmethod
98-
def batch_iat_insert(self, all_data: List[CacheData]):
99-
pass
100-
10197
@abstractmethod
10298
def insert_query_resp(self, query_resp, **kwargs):
10399
pass

modelcache/manager/scalar_data/sql_storage.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def _insert(self, data: List):
4040
embedding_data = data[2]
4141
model = data[3]
4242
answer_type = 0
43-
print('embedding_data: {}'.format(embedding_data))
4443
embedding_data = embedding_data.tobytes()
4544

4645
table_name = "cache_codegpt_answer"

modelcache/processor/pre.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,3 @@ def multi_analysis(dialog_str):
108108

109109
# 输出结果
110110
return result_list
111-
112-
113-
def mm_insert_dict(data: Dict[str, Any], **_: Dict[str, Any]) -> Any:
114-
print('chat_info: {}'.format(data.get("chat_info")))
115-
query_dict = data.get("chat_info")[-1]['query']
116-
return query_dict
117-
118-
119-
def mm_query_dict(data: Dict[str, Any], **_: Dict[str, Any]) -> Any:
120-
query_dict = data.get("query")
121-
return query_dict

modelcache/utils/index_util.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,26 @@ def get_index_prefix(model):
99
return 'prefix' + '_' + model
1010

1111

12-
def get_mm_index_name(model, mm_type):
13-
print('mm_type: {}'.format(mm_type))
14-
if mm_type not in ['IMG_TEXT', 'mm', 'IMG', 'image', 'TEXT', 'text']:
15-
raise ValueError('mm_type is not normal!')
16-
if mm_type == 'IMG_TEXT':
17-
mm_type = 'mm'
18-
elif mm_type == 'IMG':
19-
mm_type = 'image'
20-
elif mm_type == 'TEXT':
21-
mm_type = 'text'
22-
return 'multicache' + '_' + model + '_' + mm_type
23-
24-
25-
def get_mm_index_prefix(model, mm_type):
26-
if mm_type not in ['IMG_TEXT', 'mm', 'IMG', 'image', 'TEXT', 'text']:
27-
raise ValueError('iat_type is not normal!')
28-
if mm_type == 'IMG_TEXT':
29-
mm_type = 'mm'
30-
elif mm_type == 'IMG':
31-
mm_type = 'image'
32-
elif mm_type == 'TEXT':
33-
mm_type = 'text'
34-
return 'prefix' + '_' + model + '_' + mm_type
12+
# def get_mm_index_name(model, mm_type):
13+
# print('mm_type: {}'.format(mm_type))
14+
# if mm_type not in ['IMG_TEXT', 'mm', 'IMG', 'image', 'TEXT', 'text']:
15+
# raise ValueError('mm_type is not normal!')
16+
# if mm_type == 'IMG_TEXT':
17+
# mm_type = 'mm'
18+
# elif mm_type == 'IMG':
19+
# mm_type = 'image'
20+
# elif mm_type == 'TEXT':
21+
# mm_type = 'text'
22+
# return 'multicache' + '_' + model + '_' + mm_type
23+
#
24+
#
25+
# def get_mm_index_prefix(model, mm_type):
26+
# if mm_type not in ['IMG_TEXT', 'mm', 'IMG', 'image', 'TEXT', 'text']:
27+
# raise ValueError('iat_type is not normal!')
28+
# if mm_type == 'IMG_TEXT':
29+
# mm_type = 'mm'
30+
# elif mm_type == 'IMG':
31+
# mm_type = 'image'
32+
# elif mm_type == 'TEXT':
33+
# mm_type = 'text'
34+
# return 'prefix' + '_' + model + '_' + mm_type

modelcache_mm/adapter/adapter_remove.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def adapt_remove(*args, **kwargs):
1919
print('id_list: {}'.format(id_list))
2020
resp = chat_cache.data_manager.delete(id_list, model=model)
2121
elif remove_type == 'truncate_by_model':
22-
resp = chat_cache.data_manager.truncate_iat(model)
22+
resp = chat_cache.data_manager.truncate(model)
2323
else:
2424
resp = "remove_type_error"
2525
return resp

modelcache_mm/embedding/data2vec.py

Lines changed: 0 additions & 108 deletions
This file was deleted.

modelcache_mm/embedding/fasttext.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

modelcache_mm/embedding/huggingface.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)