mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
Update engine_client.py (#2931)
This commit is contained in:
@@ -81,9 +81,6 @@ class EngineClient:
|
|||||||
"""
|
"""
|
||||||
Format the request data and send the request to the server.
|
Format the request data and send the request to the server.
|
||||||
"""
|
"""
|
||||||
if "request_id" in prompts:
|
|
||||||
prompts["request_id"] = prompts["request_id"]
|
|
||||||
|
|
||||||
if "request_id" not in prompts:
|
if "request_id" not in prompts:
|
||||||
request_id = str(uuid.uuid4())
|
request_id = str(uuid.uuid4())
|
||||||
prompts["request_id"] = request_id
|
prompts["request_id"] = request_id
|
||||||
@@ -144,7 +141,7 @@ class EngineClient:
|
|||||||
task["preprocess_end_time"] = time.time()
|
task["preprocess_end_time"] = time.time()
|
||||||
preprocess_cost_time = task["preprocess_end_time"] - task["preprocess_start_time"]
|
preprocess_cost_time = task["preprocess_end_time"] - task["preprocess_start_time"]
|
||||||
api_server_logger.info(
|
api_server_logger.info(
|
||||||
f"Cache request with request_id ({task.get('request_id')}), " f"cost {time.time() - preprocess_cost_time}"
|
f"Cache request with request_id ({task.get('request_id')}), " f"preprocess time cost {preprocess_cost_time}"
|
||||||
)
|
)
|
||||||
|
|
||||||
self.vaild_parameters(task)
|
self.vaild_parameters(task)
|
||||||
|
Reference in New Issue
Block a user