[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:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user