Crash the server correctly during error (#2231)
This commit is contained in:
@@ -47,6 +47,7 @@ import itertools
|
||||
import json
|
||||
import logging
|
||||
import multiprocessing
|
||||
import os
|
||||
import time
|
||||
from typing import Tuple
|
||||
|
||||
@@ -62,11 +63,7 @@ from sglang.srt.model_executor.model_runner import ModelRunner
|
||||
from sglang.srt.sampling.sampling_params import SamplingParams
|
||||
from sglang.srt.server import _set_envs_and_config
|
||||
from sglang.srt.server_args import PortArgs, ServerArgs
|
||||
from sglang.srt.utils import (
|
||||
configure_logger,
|
||||
kill_child_process,
|
||||
suppress_other_loggers,
|
||||
)
|
||||
from sglang.srt.utils import configure_logger, kill_process_tree, suppress_other_loggers
|
||||
|
||||
|
||||
@dataclasses.dataclass
|
||||
@@ -468,4 +465,4 @@ if __name__ == "__main__":
|
||||
main(server_args, bench_args)
|
||||
finally:
|
||||
if server_args.tp_size != 1:
|
||||
kill_child_process()
|
||||
kill_process_tree(os.getpid(), include_parent=False)
|
||||
|
||||
Reference in New Issue
Block a user