mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
clean vllm tonight
This commit is contained in:
parent
75a032bf3e
commit
fae87dcaaa
2 changed files with 1 additions and 6 deletions
|
|
@ -99,11 +99,7 @@ def get_batch(url: str = "http://localhost:8000"):
|
||||||
Raises:
|
Raises:
|
||||||
RuntimeError: If trainer is not registered or other API error
|
RuntimeError: If trainer is not registered or other API error
|
||||||
"""
|
"""
|
||||||
response = requests.get(
|
data = requests.get(f"{url}/batch", timeout=10).json()
|
||||||
f"{url}/batch",
|
|
||||||
timeout=10,
|
|
||||||
)
|
|
||||||
data = response.json()
|
|
||||||
|
|
||||||
# Check if there was an error (trainer not registered)
|
# Check if there was an error (trainer not registered)
|
||||||
if data.get("status") == "error":
|
if data.get("status") == "error":
|
||||||
|
|
|
||||||
|
|
@ -325,7 +325,6 @@ async def _generate(request_dict: dict, raw_request: Request) -> Response:
|
||||||
async for request_output in results_generator:
|
async for request_output in results_generator:
|
||||||
final_output = request_output
|
final_output = request_output
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
logger.warning("POST /generate cancelled request_id=%s", request_id)
|
|
||||||
return Response(status_code=499)
|
return Response(status_code=499)
|
||||||
|
|
||||||
assert final_output is not None
|
assert final_output is not None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue