Skip to content

Commit

Permalink
async_v2
Browse files Browse the repository at this point in the history
  • Loading branch information
supa-thibaud committed Aug 23, 2024
1 parent 835d331 commit 51e46e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ def start_server(self):

self.test_concurrency()

async def test_concurrency():
async def test_concurrency(self):
engine = SGlangEngine()

# Create a large number of sample inputs
test_concurrency = int(os.getenv("TEST_CONCURRENCY", 10))
inputs = [{"prompt": f"This is test prompt {i}"} for i in range(test_concurrency)]
nb_test_concurrency = int(os.getenv("TEST_CONCURRENCY", 10))
inputs = [{"prompt": f"This is test prompt {i}"} for i in range(nb_test_concurrency)]

results = []
async for result in engine.generate(inputs):
Expand Down

0 comments on commit 51e46e4

Please sign in to comment.