Skip to content

Commit

Permalink
use tqdm for linux windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RexWzh committed Nov 1, 2023
1 parent 0afb612 commit 2796a7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions chattool/asynctool.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from typing import List, Dict, Union, Callable
from chattool import Chat, Resp, load_chats
import chattool
from tqdm.asyncio import tqdm
from tqdm.asyncio import tqdm, tqdm_asyncio

async def async_post( session
, sem
Expand Down Expand Up @@ -119,7 +119,8 @@ async def chat_complete(ind, locker, chatlog, chkpoint, **options):
if chattool.platform == "macos":
responses = await tqdm.gather(tasks)
else: # for windows and linux
responses = await asyncio.gather(*tasks)
# responses = await asyncio.gather(*tasks)
responses = tqdm_asyncio.gather(*tasks)
for ind, cost in responses:
costs[ind] = cost
return costs
Expand Down

0 comments on commit 2796a7d

Please sign in to comment.