The asyncio.as_completed() function does not guarantee that the results are ordered
This commit is contained in:
parent
b7552f35aa
commit
cf0278ca43
2 changed files with 2 additions and 2 deletions
|
|
@ -59,7 +59,7 @@ class MilvusVectorDBStorge(BaseVectorStorage):
|
|||
embedding_tasks = [self.embedding_func(batch) for batch in batches]
|
||||
embeddings_list = []
|
||||
for f in tqdm_async(
|
||||
asyncio.as_completed(embedding_tasks),
|
||||
await asyncio.gather(*embedding_tasks),
|
||||
total=len(embedding_tasks),
|
||||
desc="Generating embeddings",
|
||||
unit="batch",
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class NanoVectorDBStorage(BaseVectorStorage):
|
|||
embedding_tasks = [self.embedding_func(batch) for batch in batches]
|
||||
embeddings_list = []
|
||||
for f in tqdm_async(
|
||||
asyncio.as_completed(embedding_tasks),
|
||||
await asyncio.gather(*embedding_tasks),
|
||||
total=len(embedding_tasks),
|
||||
desc="Generating embeddings",
|
||||
unit="batch",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue