Skip to content

Commit

Permalink
add type check for run_async_server
Browse files Browse the repository at this point in the history
  • Loading branch information
bugsz committed Dec 4, 2024
1 parent 3e5beb6 commit af63410
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sotopia/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,13 @@ def get_agent_class(
else [await i for i in episode_futures]
)

return batch_results
if len(batch_results) > 0:
first_result = batch_results[0]
assert isinstance(
first_result, list
), f"Unexpected result type: {type(first_result)}"

return batch_results # type: ignore


async def arun_one_script(
Expand Down

0 comments on commit af63410

Please sign in to comment.