[Mini-VLLM] Cut non-OpenAI surfaces, dead kernels, Mistral stack
- Remove Anthropic, Cohere, SageMaker, decisions, structured-decisions, rl, render-launcher and batch entrypoints; keep scale-out token routes - Drop the Swagger static bundle and the /docs, /redoc routes - Delete device-keyed tuning configs for fused_moe, quant utils, mamba select-state and helion; no sm86 entry ever existed for any of them - Remove ten unused rope variants plus the fbgemm_fp8 and fp_quant quantizers and their config, metrics and loader plumbing - Cut the CPU device build: csrc/cpu, cpu_extension.cmake, cpu requirements and the setup.py cpu target path - Delete 29 environment variables nothing reads and 14 chat-template fallbacks for models this fork no longer registers - Remove nine dead CUDA ops (deepseek_v4, kimi_k3, minimax, muse_spark, dsv3 gemm) with their kernels, bindings, wrappers and CMake entries - Delete the connector test suites that targeted removed connectors - Cut the Mistral tokenizer and parser stack, its tests, and the mistral_common and ijson dependency pins - Restore the Qwen4Exp registry rows and nvidia/mtp.py that an earlier cut deleted while keeping the model tree Co-authored-by: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
import multiprocessing
|
||||
import os
|
||||
import socket
|
||||
import threading
|
||||
import time
|
||||
@@ -410,198 +409,3 @@ def test_external_process_monitoring(api_server_args):
|
||||
mock_coordinator.shutdown()
|
||||
time.sleep(0.2)
|
||||
WORKER_RUNTIME_SECONDS = prev_worker_runtime
|
||||
|
||||
|
||||
def test_rust_frontend_launch_log_redacts_credentials(monkeypatch):
|
||||
"""The Rust frontend command carries every non-default arg as JSON.
|
||||
Credentials must not reach the log line."""
|
||||
import subprocess as subprocess_mod
|
||||
|
||||
from vllm.entrypoints.launchers.cli_args import make_arg_parser
|
||||
from vllm.utils.argparse_utils import FlexibleArgumentParser
|
||||
from vllm.v1.utils import RustFrontendProcessManager
|
||||
|
||||
hf_token = "hf_TESTTOKEN123"
|
||||
api_key = "sk-TESTKEY456"
|
||||
args = make_arg_parser(FlexibleArgumentParser()).parse_args(
|
||||
["--model", "org/model", "--hf-token", hf_token, "--api-key", api_key]
|
||||
)
|
||||
|
||||
class _FakeProc:
|
||||
pid = 4321
|
||||
returncode = 0
|
||||
|
||||
def poll(self):
|
||||
return 0
|
||||
|
||||
def wait(self, timeout=None):
|
||||
return 0
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
input_listener = make_zmq_listener("tcp://127.0.0.1:0", zmq.ROUTER)
|
||||
output_listener = make_zmq_listener("tcp://127.0.0.1:0", zmq.PULL)
|
||||
try:
|
||||
monkeypatch.setattr(subprocess_mod, "Popen", lambda *a, **kw: _FakeProc())
|
||||
with patch("vllm.v1.utils.logger.info") as log_info:
|
||||
RustFrontendProcessManager(
|
||||
binary_path="/nonexistent/vllm-rs",
|
||||
sock=sock,
|
||||
args=args,
|
||||
input_listener=input_listener,
|
||||
output_listener=output_listener,
|
||||
engine_start_index=0,
|
||||
engine_count=1,
|
||||
data_parallel_size=1,
|
||||
)
|
||||
finally:
|
||||
sock.close()
|
||||
|
||||
log_format, *log_args = log_info.call_args.args
|
||||
message = log_format % tuple(log_args)
|
||||
assert "Launching Rust frontend:" in message
|
||||
assert hf_token not in message
|
||||
assert api_key not in message
|
||||
assert '"hf_token": "***"' in message
|
||||
assert '"api_key": "***"' in message
|
||||
|
||||
|
||||
def test_rust_frontend_uses_config_model_as_model_tag(monkeypatch, caplog, tmp_path):
|
||||
"""Config-only model selection must be forwarded to the Rust frontend."""
|
||||
import subprocess as subprocess_mod
|
||||
|
||||
from vllm.entrypoints.launchers.cli_args import make_arg_parser
|
||||
from vllm.utils.argparse_utils import FlexibleArgumentParser
|
||||
from vllm.v1.utils import RustFrontendProcessManager
|
||||
|
||||
config_path = tmp_path / "config.yml"
|
||||
config_path.write_text("model: org/model\n")
|
||||
args = make_arg_parser(FlexibleArgumentParser()).parse_args(
|
||||
["--config", str(config_path)]
|
||||
)
|
||||
assert args.model == "org/model"
|
||||
assert args.model_tag is None
|
||||
|
||||
class _FakeProc:
|
||||
pid = 4321
|
||||
returncode = 0
|
||||
|
||||
def poll(self):
|
||||
return 0
|
||||
|
||||
def wait(self, timeout=None):
|
||||
return 0
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
input_listener = make_zmq_listener("tcp://127.0.0.1:0", zmq.ROUTER)
|
||||
output_listener = make_zmq_listener("tcp://127.0.0.1:0", zmq.PULL)
|
||||
try:
|
||||
monkeypatch.setattr(subprocess_mod, "Popen", lambda *a, **kw: _FakeProc())
|
||||
with caplog.at_level("INFO", logger="vllm.v1.utils"):
|
||||
RustFrontendProcessManager(
|
||||
binary_path="/nonexistent/vllm-rs",
|
||||
sock=sock,
|
||||
args=args,
|
||||
input_listener=input_listener,
|
||||
output_listener=output_listener,
|
||||
engine_start_index=0,
|
||||
engine_count=1,
|
||||
data_parallel_size=1,
|
||||
)
|
||||
finally:
|
||||
sock.close()
|
||||
|
||||
assert '"model_tag": "org/model"' in caplog.text
|
||||
|
||||
|
||||
def test_rust_frontend_inherits_grpc_listener(monkeypatch):
|
||||
"""The Python-bound gRPC socket is passed to Rust like the HTTP one."""
|
||||
import subprocess as subprocess_mod
|
||||
|
||||
from vllm.entrypoints.launchers.cli_args import make_arg_parser
|
||||
from vllm.utils.argparse_utils import FlexibleArgumentParser
|
||||
from vllm.v1.utils import RustFrontendProcessManager
|
||||
|
||||
args = make_arg_parser(FlexibleArgumentParser()).parse_args(
|
||||
["--model", "org/model", "--grpc-port", "50051"]
|
||||
)
|
||||
|
||||
class _FakeProc:
|
||||
pid = 4321
|
||||
returncode = 0
|
||||
|
||||
def poll(self):
|
||||
return 0
|
||||
|
||||
def wait(self, timeout=None):
|
||||
return 0
|
||||
|
||||
popen_calls = []
|
||||
|
||||
def fake_popen(cmd, **kwargs):
|
||||
popen_calls.append((cmd, kwargs))
|
||||
return _FakeProc()
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
grpc_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
input_listener = make_zmq_listener("tcp://127.0.0.1:0", zmq.ROUTER)
|
||||
output_listener = make_zmq_listener("tcp://127.0.0.1:0", zmq.PULL)
|
||||
input_fd = input_listener.socket.fileno()
|
||||
output_fd = output_listener.socket.fileno()
|
||||
try:
|
||||
monkeypatch.setattr(subprocess_mod, "Popen", fake_popen)
|
||||
RustFrontendProcessManager(
|
||||
binary_path="/nonexistent/vllm-rs",
|
||||
sock=sock,
|
||||
args=args,
|
||||
input_listener=input_listener,
|
||||
output_listener=output_listener,
|
||||
engine_start_index=0,
|
||||
engine_count=1,
|
||||
data_parallel_size=1,
|
||||
grpc_sock=grpc_sock,
|
||||
)
|
||||
[(cmd, kwargs)] = popen_calls
|
||||
grpc_fd = grpc_sock.fileno()
|
||||
flag_index = cmd.index("--grpc-listen-fd")
|
||||
assert cmd[flag_index + 1] == str(grpc_fd)
|
||||
assert list(kwargs["pass_fds"]) == [
|
||||
sock.fileno(),
|
||||
input_fd,
|
||||
output_fd,
|
||||
grpc_fd,
|
||||
]
|
||||
finally:
|
||||
sock.close()
|
||||
grpc_sock.close()
|
||||
|
||||
|
||||
def test_rust_frontend_spawn_failure_cleans_up_listeners(tmp_path):
|
||||
"""No child owns the listeners when Popen fails, so the parent removes them."""
|
||||
from vllm.entrypoints.launchers.cli_args import make_arg_parser
|
||||
from vllm.utils.argparse_utils import FlexibleArgumentParser
|
||||
from vllm.v1.utils import RustFrontendProcessManager
|
||||
|
||||
args = make_arg_parser(FlexibleArgumentParser()).parse_args(
|
||||
["--model", "org/model"]
|
||||
)
|
||||
input_listener = make_zmq_listener(f"ipc://{tmp_path}/input.sock", zmq.ROUTER)
|
||||
output_listener = make_zmq_listener(f"ipc://{tmp_path}/output.sock", zmq.PULL)
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
try:
|
||||
with pytest.raises(FileNotFoundError):
|
||||
RustFrontendProcessManager(
|
||||
binary_path=str(tmp_path / "missing-vllm-rs"),
|
||||
sock=sock,
|
||||
args=args,
|
||||
input_listener=input_listener,
|
||||
output_listener=output_listener,
|
||||
engine_start_index=0,
|
||||
engine_count=1,
|
||||
data_parallel_size=1,
|
||||
)
|
||||
finally:
|
||||
sock.close()
|
||||
|
||||
for listener in (input_listener, output_listener):
|
||||
assert listener.socket.fileno() == -1
|
||||
assert not os.path.exists(listener.address.removeprefix("ipc://"))
|
||||
|
||||
Reference in New Issue
Block a user