Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Index
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
run-llama
Llama Index
Commits
19497b67
Unverified
Commit
19497b67
authored
1 year ago
by
Logan
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix show progress being out of order (#12897)
parent
6b97753d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llama-index-core/llama_index/core/async_utils.py
+3
-6
3 additions, 6 deletions
llama-index-core/llama_index/core/async_utils.py
with
3 additions
and
6 deletions
llama-index-core/llama_index/core/async_utils.py
+
3
−
6
View file @
19497b67
"""
Async utils.
"""
import
asyncio
import
tqdm
from
itertools
import
zip_longest
from
typing
import
Any
,
Coroutine
,
Iterable
,
List
,
Optional
,
TypeVar
...
...
@@ -119,11 +118,9 @@ async def run_jobs(
pool_jobs
=
[
worker
(
job
)
for
job
in
jobs
]
if
show_progress
:
results
=
[]
for
result
in
tqdm
.
tqdm
(
asyncio
.
as_completed
(
pool_jobs
),
total
=
len
(
pool_jobs
),
desc
=
desc
):
results
.
append
(
await
result
)
from
tqdm.asyncio
import
tqdm_asyncio
results
=
await
tqdm_asyncio
.
gather
(
*
pool_jobs
,
desc
=
desc
)
else
:
results
=
await
asyncio
.
gather
(
*
pool_jobs
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment