|
31 | 31 | import pytest |
32 | 32 | import yaml |
33 | 33 | from defs.common import get_free_port_in_ci as get_free_port |
34 | | -from defs.common import parse_gsm8k_output, wait_for_server |
| 34 | +from defs.common import (parse_gsm8k_output, resolve_llm_model_path, |
| 35 | + wait_for_server) |
35 | 36 | from defs.conftest import (get_sm_version, llm_models_root, skip_arm, |
36 | 37 | skip_no_hopper, skip_pre_blackwell, skip_pre_hopper) |
37 | 38 | from defs.trt_test_alternative import check_call, check_output, print_info |
@@ -343,13 +344,6 @@ def setup_model_symlink(llm_venv, model_root, dest_subpath): |
343 | 344 | os.symlink(model_root, dst, target_is_directory=True) |
344 | 345 |
|
345 | 346 |
|
346 | | -def _resolve_llm_model_path(model_path: str) -> str: |
347 | | - """Resolve a model subpath relative to the test LLM model root.""" |
348 | | - if os.path.isabs(model_path): |
349 | | - return model_path |
350 | | - return os.path.join(llm_models_root(), model_path) |
351 | | - |
352 | | - |
353 | 347 | ClientTestSet = namedtuple('ClientTestSet', [ |
354 | 348 | 'completion', 'completion_streaming', 'chat', 'chat_streaming', |
355 | 349 | 'verify_completion', 'verify_streaming_completion', 'verify_chat', |
@@ -636,7 +630,7 @@ def setup_disagg_cluster( |
636 | 630 | if isinstance(speculative_config, dict): |
637 | 631 | speculative_model = speculative_config.get("speculative_model") |
638 | 632 | if speculative_model: |
639 | | - speculative_config["speculative_model"] = _resolve_llm_model_path( |
| 633 | + speculative_config["speculative_model"] = resolve_llm_model_path( |
640 | 634 | speculative_model) |
641 | 635 |
|
642 | 636 | disagg_cluster = get_default_disagg_cluster_config() |
@@ -670,7 +664,7 @@ def setup_disagg_cluster( |
670 | 664 | # Launch workers |
671 | 665 | model = model_name or config.get("model") |
672 | 666 | if model: |
673 | | - model = _resolve_llm_model_path(model) |
| 667 | + model = resolve_llm_model_path(model) |
674 | 668 | ctx_workers = [] |
675 | 669 | gen_workers = [] |
676 | 670 | disagg_server = None |
@@ -2317,7 +2311,7 @@ def test_disaggregated_gpt_oss_120b_harmony(disaggregated_test_root, |
2317 | 2311 | def test_disaggregated_qwen3_32b_fp8(disaggregated_test_root, |
2318 | 2312 | disaggregated_example_root, llm_venv, |
2319 | 2313 | model_path): |
2320 | | - model_dir = _resolve_llm_model_path(model_path) |
| 2314 | + model_dir = resolve_llm_model_path(model_path) |
2321 | 2315 | setup_model_symlink(llm_venv, model_dir, model_path) |
2322 | 2316 |
|
2323 | 2317 | run_disaggregated_test(disaggregated_example_root, |
@@ -2407,7 +2401,7 @@ def test_disaggregated_stress_test(disaggregated_test_root, |
2407 | 2401 | # Unpack configuration from dataclass |
2408 | 2402 | model_path = test_config.model_path |
2409 | 2403 | test_desc = test_config.test_desc |
2410 | | - model_dir = _resolve_llm_model_path(model_path) |
| 2404 | + model_dir = resolve_llm_model_path(model_path) |
2411 | 2405 | setup_model_symlink(llm_venv, model_dir, model_path) |
2412 | 2406 |
|
2413 | 2407 | config_file = get_test_config(test_desc, disaggregated_example_root, |
|
0 commit comments