Add the ability to enable and disable the Profiler via HTTP API. (#1626)

This commit is contained in:
科英
2024-10-11 17:34:25 +08:00
committed by GitHub
parent b503881bd2
commit bbd72bfc86
4 changed files with 73 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ processes (TokenizerManager, DetokenizerManager, Controller).
import uuid
from dataclasses import dataclass
from enum import Enum
from typing import Dict, List, Optional, Union
from sglang.srt.managers.schedule_batch import BaseFinishReason
@@ -343,3 +344,8 @@ class UpdateWeightReqOutput:
class AbortReq:
# The request id
rid: str
class ProfileReq(Enum):
START_PROFILE = 1
STOP_PROFILE = 2