|
30 | 30 | import pytest |
31 | 31 | import yaml |
32 | 32 | from defs.common import get_free_port_in_ci as get_free_port |
33 | | -from defs.common import parse_gsm8k_output, wait_for_server |
| 33 | +from defs.common import (parse_gsm8k_output, resolve_llm_model_path, |
| 34 | + wait_for_server) |
34 | 35 | from defs.conftest import (get_sm_version, llm_models_root, skip_arm, |
35 | 36 | skip_no_hopper, skip_pre_blackwell, skip_pre_hopper) |
36 | 37 | from defs.trt_test_alternative import check_call, check_output, print_info |
@@ -294,13 +295,6 @@ def setup_model_symlink(llm_venv, model_root, dest_subpath): |
294 | 295 | os.symlink(model_root, dst, target_is_directory=True) |
295 | 296 |
|
296 | 297 |
|
297 | | -def _resolve_llm_model_path(model_path: str) -> str: |
298 | | - """Resolve a model subpath relative to the test LLM model root.""" |
299 | | - if os.path.isabs(model_path): |
300 | | - return model_path |
301 | | - return os.path.join(llm_models_root(), model_path) |
302 | | - |
303 | | - |
304 | 298 | ClientTestSet = namedtuple('ClientTestSet', [ |
305 | 299 | 'completion', 'completion_streaming', 'chat', 'chat_streaming', |
306 | 300 | 'verify_completion', 'verify_streaming_completion', 'verify_chat', |
@@ -510,7 +504,7 @@ def setup_disagg_cluster( |
510 | 504 | if isinstance(speculative_config, dict): |
511 | 505 | speculative_model = speculative_config.get("speculative_model") |
512 | 506 | if speculative_model: |
513 | | - speculative_config["speculative_model"] = _resolve_llm_model_path( |
| 507 | + speculative_config["speculative_model"] = resolve_llm_model_path( |
514 | 508 | speculative_model) |
515 | 509 |
|
516 | 510 | disagg_cluster = get_default_disagg_cluster_config() |
@@ -544,7 +538,7 @@ def setup_disagg_cluster( |
544 | 538 | # Launch workers |
545 | 539 | model = model_name or config.get("model") |
546 | 540 | if model: |
547 | | - model = _resolve_llm_model_path(model) |
| 541 | + model = resolve_llm_model_path(model) |
548 | 542 | ctx_workers = [] |
549 | 543 | gen_workers = [] |
550 | 544 | disagg_server = None |
@@ -2099,7 +2093,7 @@ def test_disaggregated_gpt_oss_120b_harmony(disaggregated_test_root, |
2099 | 2093 | def test_disaggregated_qwen3_32b_fp8(disaggregated_test_root, |
2100 | 2094 | disaggregated_example_root, llm_venv, |
2101 | 2095 | model_path): |
2102 | | - model_dir = _resolve_llm_model_path(model_path) |
| 2096 | + model_dir = resolve_llm_model_path(model_path) |
2103 | 2097 | setup_model_symlink(llm_venv, model_dir, model_path) |
2104 | 2098 |
|
2105 | 2099 | run_disaggregated_test(disaggregated_example_root, |
@@ -2140,7 +2134,7 @@ def test_disaggregated_stress_test(disaggregated_test_root, |
2140 | 2134 | # Unpack configuration from dataclass |
2141 | 2135 | model_path = test_config.model_path |
2142 | 2136 | test_desc = test_config.test_desc |
2143 | | - model_dir = _resolve_llm_model_path(model_path) |
| 2137 | + model_dir = resolve_llm_model_path(model_path) |
2144 | 2138 | setup_model_symlink(llm_venv, model_dir, model_path) |
2145 | 2139 |
|
2146 | 2140 | config_file = get_test_config(test_desc, disaggregated_example_root, |
|
0 commit comments