Skip to content

Commit

Permalink
Fix load test (#3508)
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyChouSr committed Aug 31, 2024
1 parent 93037a4 commit 8714da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Empty file removed error_log.txt
Empty file.
5 changes: 2 additions & 3 deletions tests/load_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ async def litellm_completion(args, tokenizer, image_url=None):

itl_list = []
content = ""
start = time.time()
async for chunk in response:
if chunk.choices[0].delta.content:
end_time = time.time()
Expand Down Expand Up @@ -101,7 +100,7 @@ async def main(args):
)

# Write errors to error_log.txt
with open("error_log.txt", "a") as error_log:
with open("load_test_errors.log", "a") as error_log:
for completion in all_completions:
if isinstance(completion, str):
error_log.write(completion + "\n")
Expand All @@ -125,6 +124,6 @@ async def main(args):

litellm_client = AsyncOpenAI(base_url=args.server_address, api_key="sk-1234")
# Blank out contents of error_log.txt
open("error_log.txt", "w").close()
open("load_test_errors.log", "w").close()

asyncio.run(main(args))

0 comments on commit 8714da2

Please sign in to comment.