Skip to content

Commit 6df621a

Browse files
committed
up
1 parent d24048c commit 6df621a

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

fastdeploy/engine/request.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ def __init__(
7070
pooling_params: Optional[PoolingParams] = None,
7171
preprocess_start_time: Optional[float] = None,
7272
preprocess_end_time: Optional[float] = None,
73+
inference_start_time: float = 0,
74+
llm_engine_recv_req_timestamp: float = 0,
7375
multimodal_inputs: Optional[dict] = None,
7476
multimodal_data: Optional[dict] = None,
7577
disable_chat_template: bool = False,
@@ -95,8 +97,6 @@ def __init__(
9597
prefill_start_index: int = 0,
9698
prefill_end_index: int = 0,
9799
num_computed_tokens: int = 0,
98-
inference_start_time: float = 0,
99-
llm_engine_recv_req_timestamp: float = 0,
100100
) -> None:
101101
self.request_id = request_id
102102
self.prompt = prompt
@@ -115,6 +115,10 @@ def __init__(
115115
self.arrival_time = arrival_time
116116
self.preprocess_start_time = preprocess_start_time
117117
self.preprocess_end_time = preprocess_end_time
118+
self.inference_start_time = inference_start_time
119+
self.llm_engine_recv_req_timestamp = (
120+
llm_engine_recv_req_timestamp if llm_engine_recv_req_timestamp else time.time()
121+
)
118122
self.disable_chat_template = disable_chat_template
119123
self.disaggregate_info = disaggregate_info
120124

@@ -163,7 +167,6 @@ def __init__(
163167
self.extend_block_tables = []
164168
# dp
165169
self.dp_rank = dp_rank
166-
self.llm_engine_recv_req_timestamp = time.time()
167170

168171
@classmethod
169172
def from_dict(cls, d: dict):

tests/e2e/utils/serving_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,15 @@ def check_service_health(base_url: str, timeout: int = 3) -> bool:
125125
return False
126126

127127

128-
def get_registered_number(router_url) -> list:
128+
def get_registered_number(router_url) -> dict:
129129
"""
130-
Get the number of registered models in the router.
130+
Get the registered model counts by type from the router.
131131
132132
Args:
133133
router_url (str): The base URL of the router, e.g. "http://localhost:8080".
134134
135135
Returns:
136-
int: The number of registered models.
136+
dict: A dictionary containing registered model counts with keys "mixed", "prefill", and "decode".
137137
"""
138138
if not router_url.startswith("http"):
139139
router_url = f"http://{router_url}"

0 commit comments

Comments
 (0)