[Profiler] Add per-session profiling controls to Python and Rust frontends (#57875)

Signed-off-by: czhu <conway.zhu@cohere.com>
Signed-off-by: Conway Zhu <conway.zhu@cohere.com>
Co-authored-by: aoshen02 <aoshen@inferact.ai>
This commit is contained in:
czhu-cohere
2026-10-06 05:21:19 +00:00
committed by GitHub
co-authored by aoshen02
parent 9a1f6fd4cb
commit 6fddc9b21e
25 changed files with 1497 additions and 164 deletions
+11
View File
@@ -181,3 +181,14 @@ class MaxQueuedTokensError(GracefulHTTPError):
"Please try again later or on a different instance.",
HTTPStatus.SERVICE_UNAVAILABLE,
)
class ProfilerAlreadyActiveError(GracefulHTTPError):
"""Raised when a profiling session is already active."""
def __init__(self):
super().__init__(
"A profiling session is already active. Call /stop_profile before "
"starting another session.",
HTTPStatus.CONFLICT,
)