Skip to content

Commit 2c64be6

Browse files
authored
[debug]: add some debug log (#699)
Co-authored-by: shihaobai <baishihao@sensetime.com>
1 parent 777fc04 commit 2c64be6

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

lightllm/server/router/model_infer/model_rpc.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,23 @@ def exposed_add_batch(self, batch_id, reqs):
9393

9494
# @calculate_time(show=False, min_cost_ms=300)
9595
def exposed_prefill_batch(self, batch_id):
96-
if self.world_size != 1:
97-
batch_id = obtain(batch_id)
98-
return self.backend.prefill_batch(batch_id)
96+
try:
97+
if self.world_size != 1:
98+
batch_id = obtain(batch_id)
99+
return self.backend.prefill_batch(batch_id)
100+
except Exception as e:
101+
err_msg = str(e)
102+
logger.exception(f"Batch prefill encountered an unexpected ERROR: {err_msg}")
99103

100104
# @calculate_time(show=True, min_cost_ms=200)
101105
def exposed_decode_batch(self, batch_id):
102-
if self.world_size != 1:
103-
batch_id = obtain(batch_id)
104-
return self.backend.decode_batch(batch_id)
106+
try:
107+
if self.world_size != 1:
108+
batch_id = obtain(batch_id)
109+
return self.backend.decode_batch(batch_id)
110+
except Exception as e:
111+
err_msg = str(e)
112+
logger.exception(f"Batch decode encountered an unexpected ERROR: {err_msg}")
105113

106114
# @calculate_time(show=True, min_cost_ms=0.1)
107115
def exposed_filter_batch(self, batch_id, req_id_list, finished_req_id_list):

0 commit comments

Comments
 (0)