Skip to content

Commit d7a1c30

Browse files
committed
WIP on threadpool impl of query_namespaces
1 parent 31eacbd commit d7a1c30

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

pinecone/data/index.py

+1-14
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def query(
363363
Union[SparseValues, Dict[str, Union[List[float], List[int]]]]
364364
] = None,
365365
**kwargs,
366-
) -> Union[QueryResponse, ApplyResult[QueryResponse]]:
366+
) -> Union[QueryResponse, ApplyResult]:
367367
"""
368368
The Query operation searches a namespace, using a query vector.
369369
It retrieves the ids of the most similar items in a namespace, along with their similarity scores.
@@ -483,7 +483,6 @@ def query_namespaces(
483483
sparse_vector: Optional[
484484
Union[SparseValues, Dict[str, Union[List[float], List[int]]]]
485485
] = None,
486-
show_progress: Optional[bool] = True,
487486
**kwargs,
488487
) -> QueryNamespacesResults:
489488
if len(namespaces) == 0:
@@ -523,18 +522,6 @@ def query_namespaces(
523522
final_results = aggregator.get_results()
524523
return final_results
525524

526-
# with tqdm(
527-
# total=len(query_tasks), disable=not show_progress, desc="Querying namespaces"
528-
# ) as pbar:
529-
# for query_task in asyncio.as_completed(query_tasks):
530-
# response = await query_task
531-
# pbar.update(1)
532-
# async with aggregator_lock:
533-
# aggregator.add_results(response)
534-
535-
# final_results = aggregator.get_results()
536-
# return final_results
537-
538525
@validate_and_convert_errors
539526
def update(
540527
self,

0 commit comments

Comments
 (0)