MCPcopy Create free account
hub / github.com/Tencent/embedx / _extract_valid_query_item

Function _extract_valid_query_item

demo/hit_rate.py:160–166  ·  view source on GitHub ↗

extrac valid query and item array

(query_list, query_embed_list, item_index_dict,
                              norm_query)

Source from the content-addressed store, hash-verified

158
159
160def _extract_valid_query_item(query_list, query_embed_list, item_index_dict,
161 norm_query):
162 "extrac valid query and item array"
163 item_index, query_index = _extract_index(item_index_dict, query_list)
164 item_array = np.asarray(item_index).reshape(-1, 1)
165 query_array = _slice_to_array(query_embed_list, query_index, norm_query)
166 return query_array, item_array
167
168
169def pretty_print(indexed_query_num, query_num, topk_list, hit_num_list):

Callers 1

eval_fileFunction · 0.85

Calls 2

_extract_indexFunction · 0.85
_slice_to_arrayFunction · 0.85

Tested by

no test coverage detected