mirror of https://github.com/inclusionAI/AReaL
[Bug] Suppress the SGLang patch error in Ray workers (#93)
This commit is contained in:
parent
54daceb6dc
commit
c7d6ccc18e
|
@ -41,11 +41,7 @@ def execute_shell_command(command: str) -> subprocess.Popen:
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def launch_server_cmd(command: str, port: int = 30000):
|
def apply_sglang_path():
|
||||||
"""
|
|
||||||
Launch the server using the given command.
|
|
||||||
If no port is specified, a free port is reserved.
|
|
||||||
"""
|
|
||||||
p = Path(os.path.dirname(__file__))
|
p = Path(os.path.dirname(__file__))
|
||||||
patch_path = str(
|
patch_path = str(
|
||||||
p.parent.parent
|
p.parent.parent
|
||||||
|
@ -72,6 +68,15 @@ def launch_server_cmd(command: str, port: int = 30000):
|
||||||
)
|
)
|
||||||
proc.wait()
|
proc.wait()
|
||||||
logger.info(f"Applied SGLang patch at {target_path}")
|
logger.info(f"Applied SGLang patch at {target_path}")
|
||||||
|
|
||||||
|
|
||||||
|
def launch_server_cmd(command: str, port: int = 30000):
|
||||||
|
"""
|
||||||
|
Launch the server using the given command.
|
||||||
|
If no port is specified, a free port is reserved.
|
||||||
|
"""
|
||||||
|
if not ray.is_initialized():
|
||||||
|
apply_sglang_path()
|
||||||
assert port is not None
|
assert port is not None
|
||||||
full_command = f"{command} --port {port}"
|
full_command = f"{command} --port {port}"
|
||||||
process = execute_shell_command(full_command)
|
process = execute_shell_command(full_command)
|
||||||
|
|
Loading…
Reference in New Issue