Fix Performance Issues: (#17083)

Co-authored-by: Wang Han <wanghan@zhejianglab.org>
This commit is contained in:
Han 2025-04-09 11:22:53 +08:00 • committed by GitHub
commit f1e4d5ed6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 151 additions and 94 deletions

View file

@ -29,15 +29,6 @@ class HitTestingService:
external_retrieval_model: dict,
limit: int = 10,
) -> dict:
if dataset.available_document_count == 0 or dataset.available_segment_count == 0:
return {
"query": {
"content": query,
"tsne_position": {"x": 0, "y": 0},
},
"records": [],
}
start = time.perf_counter()
# get retrieval model , if the model is not setting , using default