From b9c04c68eb43f6df40684b62e6b035eb933d793e Mon Sep 17 00:00:00 2001 From: rex <1073853456@qq.com> Date: Sun, 10 Mar 2024 16:42:56 +0800 Subject: [PATCH] edit filename: chattool=>chattype --- chattool/__init__.py | 2 +- chattool/{chattool.py => chattype.py} | 0 chattool/checkpoint.py | 2 +- tests/test_async.py | 5 ++--- 4 files changed, 4 insertions(+), 5 deletions(-) rename chattool/{chattool.py => chattype.py} (100%) diff --git a/chattool/__init__.py b/chattool/__init__.py index f411d69..1dd521d 100644 --- a/chattool/__init__.py +++ b/chattool/__init__.py @@ -5,7 +5,7 @@ __version__ = '3.1.1' import os, sys, requests -from .chattool import Chat, Resp +from .chattype import Chat, Resp from .checkpoint import load_chats, process_chats from .proxy import proxy_on, proxy_off, proxy_status from . import request diff --git a/chattool/chattool.py b/chattool/chattype.py similarity index 100% rename from chattool/chattool.py rename to chattool/chattype.py diff --git a/chattool/checkpoint.py b/chattool/checkpoint.py index 0e17eee..d93c34c 100644 --- a/chattool/checkpoint.py +++ b/chattool/checkpoint.py @@ -1,6 +1,6 @@ import json, warnings, os from typing import List, Dict, Union, Callable, Any -from .chattool import Chat +from .chattype import Chat import tqdm def load_chats( checkpoint:str): diff --git a/tests/test_async.py b/tests/test_async.py index 6867736..fa2abcb 100644 --- a/tests/test_async.py +++ b/tests/test_async.py @@ -53,9 +53,8 @@ async def show_resp(chat): def test_async_process(): chkpoint = testpath + "test_async.jsonl" t = time.time() - resp = async_chat_completion(chatlogs[:1], chkpoint, clearfile=True, nproc=3) - resp = async_chat_completion(chatlogs, chkpoint, nproc=3) - assert all(resp) + async_chat_completion(chatlogs[:1], chkpoint, clearfile=True, nproc=3) + async_chat_completion(chatlogs, chkpoint, nproc=3) print(f"Time elapsed: {time.time() - t:.2f}s") # broken test