fix get_memory_pool_size deadlock for DP (#1830)

This commit is contained in:
Byron Hsu
2024-10-28 23:07:14 -07:00
committed by GitHub
parent 0a24eb850a
commit 680cad2023
3 changed files with 34 additions and 5 deletions

View File

@@ -177,7 +177,8 @@ async def get_memory_pool_size():
"""Get the memory pool size in number of tokens"""
try:
ret = await tokenizer_manager.get_memory_pool_size()
return ret.size
return ret
except Exception as e:
return JSONResponse(
{"error": {"message": str(e)}}, status_code=HTTPStatus.BAD_REQUEST