8000 clean up annoy warning in predict.py · github/CodeSearchNet@386a402 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Apr 11, 2023. It is now read-only.

Commit 386a402

Browse files
committed
clean up annoy warning in predict.py
1 parent 37a0c58 commit 386a402

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/predict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def query_model(query, model, indices, language, topk=100):
111111
indexes = [{'code_tokens': d['function_tokens'], 'language': d['language']} for d in tqdm(definitions)]
112112
code_representations = model.get_code_representations(indexes)
113113

114-
indices = AnnoyIndex(code_representations[0].shape[0])
114+
indices = AnnoyIndex(code_representations[0].shape[0], 'angular')
115115
for index, vector in tqdm(enumerate(code_representations)):
116116
if vector is not None:
117117
indices.add_item(index, vector)

0 commit comments

Comments
 (0)
0