[CI][PD] Add NIXL disaggregation functional tests (#27894)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Shangming Cai <csmthu@gmail.com>
This commit is contained in:
co-authored by
gemini-code-assist[bot]
Shangming Cai
parent
2cf2e7377f
commit
df39a7b0b6
@@ -7,6 +7,8 @@ import warnings
|
||||
from typing import ClassVar, Optional
|
||||
from urllib.parse import urlparse
|
||||
|
||||
import requests
|
||||
|
||||
from sglang.srt.environ import envs
|
||||
from sglang.srt.utils import kill_process_tree
|
||||
from sglang.test.test_utils import (
|
||||
@@ -23,6 +25,27 @@ from sglang.utils import wait_for_http_ready
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def configure_nixl_pd_backend(test_cls):
|
||||
test_cls.transfer_backend = ["--disaggregation-transfer-backend", "nixl"]
|
||||
# NIXL backend/network selection is driven by NIXL environment variables
|
||||
# such as SGLANG_DISAGGREGATION_NIXL_BACKEND and backend params, not by the
|
||||
# Mooncake-specific --disaggregation-ib-device argument.
|
||||
test_cls.rdma_devices = []
|
||||
|
||||
|
||||
def assert_process_healthy(test_case, name, process, url, health_path="/health"):
|
||||
test_case.assertIsNotNone(process, f"{name} process was not started")
|
||||
test_case.assertIsNone(
|
||||
process.poll(),
|
||||
f"{name} exited unexpectedly with code {process.returncode}",
|
||||
)
|
||||
try:
|
||||
response = requests.get(f"{url}{health_path}", timeout=10)
|
||||
except requests.RequestException as e:
|
||||
test_case.fail(f"Failed to connect to {name} health endpoint: {e}")
|
||||
test_case.assertEqual(response.status_code, 200, response.text)
|
||||
|
||||
|
||||
class PDDisaggregationServerBase(CustomTestCase):
|
||||
capture_per_side_logs: ClassVar[bool] = False
|
||||
extra_prefill_env: ClassVar[dict[str, str]] = {}
|
||||
|
||||
Reference in New Issue
Block a user