Skip to content

Commit

Permalink
fix tp exit code for pytorch engine (InternLM#2718)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunningLeon authored and AllentDan committed Nov 13, 2024
1 parent 499da95 commit 7e72fc3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lmdeploy/pytorch/engine/model_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,8 @@ def _check_context_alive(mp_context: mp.ProcessContext):
for idx, exitcode in log_procs:
logger.error(f'TP process {idx} failed with exitcode {exitcode}.')
# TODO: not safe exit.
os._exit(1)
exit_code = 1 if len(log_procs) > 0 else 0
os._exit(exit_code)


def _find_available_port() -> bool:
Expand Down

0 comments on commit 7e72fc3

Please sign in to comment.