Skip to content

Commit 14f6384

Browse files
authored
upsert_from_dataframe: Hide all progressbars if !show_progress (#310)
## Problem For GRPCIndex.upsert_from_dataframe() there is a second progressbar used when use_async_requests is true (the default) - 'collecting async responses'. However this progressbar is always shown, even if show_progress is false. ## Solution Make it respect the show_progress argument. ## Type of Change - [x] Bug fix (non-breaking change which fixes an issue)
1 parent 886f932 commit 14f6384

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pinecone/grpc/index_grpc.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def upsert_from_dataframe(
188188

189189
if use_async_requests:
190190
cast_results = cast(List[PineconeGrpcFuture], results)
191-
results = [async_result.result() for async_result in tqdm(cast_results, desc="collecting async responses")]
191+
results = [async_result.result() for async_result in
192+
tqdm(cast_results, disable=not show_progress, desc="collecting async responses")]
192193

193194
upserted_count = 0
194195
for res in results:

0 commit comments

Comments
 (0)