Fix stop_profile does not wait for finishing (#4741)

This commit is contained in:
fzyzcjy
2025-05-17 17:06:15 -07:00
committed by GitHub
parent e3b8a72291
commit 01d2838c0f
4 changed files with 19 additions and 11 deletions
+1 -1
View File
@@ -355,7 +355,7 @@ async def start_profile_async(obj: Optional[ProfileReqInput] = None):
@app.api_route("/stop_profile", methods=["GET", "POST"])
async def stop_profile_async():
"""Stop profiling."""
_global_state.tokenizer_manager.stop_profile()
await _global_state.tokenizer_manager.stop_profile()
return Response(
content="Stop profiling. This will take some time.\n",
status_code=200,