Describe the bug
id_results: GetResult = collection.get(ids, include=["embeddings"])
temp_collection = temp_client.create_collection(
name="temp", metadata={"hnsw:space": "cosine"}
)
temp_collection.add(ids=id_results["ids"], embeddings=id_results["embeddings"])
query_result: QueryResult = temp_collection.query(
query_embeddings=query_embeddings, n_results=len(ids)
)
assert len(query_result["ids"]) == len(query_result["distances"])
id_scores_dict = {id_: [] for id_ in ids}
for id_list, score_list in zip(query_result["ids"], query_result["distances"]):
for id_ in list(id_scores_dict.keys()):
id_idx = id_list.index(id_)
id_scores_dict[id_].append(score_list[id_idx])
id_scores_pd = pd.DataFrame(id_scores_dict)
temp_client.delete_collection("temp")
return id_scores_pd.max(axis=0).tolist()
Need to fix here because our distance score.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too