Skip to content

Commit

Permalink
[debug]: add some debug log (#699)
Browse files Browse the repository at this point in the history
Co-authored-by: shihaobai <[email protected]>
  • Loading branch information
shihaobai and shihaobai authored Jan 6, 2025
1 parent 777fc04 commit 2c64be6
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions lightllm/server/router/model_infer/model_rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,23 @@ def exposed_add_batch(self, batch_id, reqs):

# @calculate_time(show=False, min_cost_ms=300)
def exposed_prefill_batch(self, batch_id):
if self.world_size != 1:
batch_id = obtain(batch_id)
return self.backend.prefill_batch(batch_id)
try:
if self.world_size != 1:
batch_id = obtain(batch_id)
return self.backend.prefill_batch(batch_id)
except Exception as e:
err_msg = str(e)
logger.exception(f"Batch prefill encountered an unexpected ERROR: {err_msg}")

# @calculate_time(show=True, min_cost_ms=200)
def exposed_decode_batch(self, batch_id):
if self.world_size != 1:
batch_id = obtain(batch_id)
return self.backend.decode_batch(batch_id)
try:
if self.world_size != 1:
batch_id = obtain(batch_id)
return self.backend.decode_batch(batch_id)
except Exception as e:
err_msg = str(e)
logger.exception(f"Batch decode encountered an unexpected ERROR: {err_msg}")

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

0 comments on commit 2c64be6

Please sign in to comment.