[Feature] Sglang Tracing: Fine-Grained Tracking for Request Latency - Part 1 (#9962)
Signed-off-by: Feng Su <sufeng@linux.alibaba.com> Signed-off-by: Huaixin Chang <changhuaixin@linux.alibaba.com> Signed-off-by: Peng Wang <rocking@linux.alibaba.com>
This commit is contained in:
@@ -605,6 +605,9 @@ class TokenizedGenerateReqInput:
|
||||
# Image gen grpc migration
|
||||
return_bytes: bool = False
|
||||
|
||||
# tracing context
|
||||
trace_context: Optional[Dict] = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class BatchTokenizedGenerateReqInput:
|
||||
@@ -654,6 +657,9 @@ class EmbeddingReqInput:
|
||||
# For background responses (OpenAI responses API)
|
||||
background: bool = False
|
||||
|
||||
# tracing context
|
||||
trace_context: Optional[Dict] = None
|
||||
|
||||
def normalize_batch_and_arguments(self):
|
||||
# at least one of text, input_ids, or image should be provided
|
||||
if self.text is None and self.input_ids is None and self.image_data is None:
|
||||
|
||||
Reference in New Issue
Block a user