[CI/Build][The Rock] Use model_class_overrides so spawned worker can use test PredictableLlamaForCausalLM class when worker spawned using Python 3.14 (#49218)
Signed-off-by: Randall Smith <Randall.Smith@amd.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
796822d141
commit
cde7ba92da
@@ -2714,7 +2714,7 @@ steps:
|
|||||||
dind: false
|
dind: false
|
||||||
agent_pool: mi300_2
|
agent_pool: mi300_2
|
||||||
num_gpus: 2
|
num_gpus: 2
|
||||||
working_dir: "/vllm-workspace/tests"
|
working_dir: "/vllm-workspace/"
|
||||||
source_file_dependencies:
|
source_file_dependencies:
|
||||||
- vllm/config/speculative.py
|
- vllm/config/speculative.py
|
||||||
- vllm/distributed/kv_transfer/kv_connector/
|
- vllm/distributed/kv_transfer/kv_connector/
|
||||||
@@ -2738,7 +2738,7 @@ steps:
|
|||||||
- vllm/platforms/rocm.py
|
- vllm/platforms/rocm.py
|
||||||
commands:
|
commands:
|
||||||
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
||||||
- pytest -v -s v1/kv_connector/extract_hidden_states_integration
|
- pytest -v -s tests/v1/kv_connector/extract_hidden_states_integration
|
||||||
|
|
||||||
- label: ":amd: (MI300) V1 Attention Shard %N" # TBD
|
- label: ":amd: (MI300) V1 Attention Shard %N" # TBD
|
||||||
timeout_in_minutes: 180
|
timeout_in_minutes: 180
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ steps:
|
|||||||
key: extract-hidden-states-integration
|
key: extract-hidden-states-integration
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
device: h200_18gb
|
device: h200_18gb
|
||||||
|
working_dir: "/vllm-workspace"
|
||||||
source_file_dependencies:
|
source_file_dependencies:
|
||||||
- vllm/v1/spec_decode/extract_hidden_states.py
|
- vllm/v1/spec_decode/extract_hidden_states.py
|
||||||
- vllm/model_executor/models/extract_hidden_states.py
|
- vllm/model_executor/models/extract_hidden_states.py
|
||||||
@@ -144,12 +145,13 @@ steps:
|
|||||||
- tests/v1/kv_connector/extract_hidden_states_integration
|
- tests/v1/kv_connector/extract_hidden_states_integration
|
||||||
commands:
|
commands:
|
||||||
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
||||||
- pytest -v -s v1/kv_connector/extract_hidden_states_integration
|
- pytest -v -s tests/v1/kv_connector/extract_hidden_states_integration
|
||||||
|
|
||||||
- label: ":nvidia: (L4) Extract Hidden States Integration"
|
- label: ":nvidia: (L4) Extract Hidden States Integration"
|
||||||
key: extract-hidden-states-integration-2-gpus
|
key: extract-hidden-states-integration-2-gpus
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
num_devices: 2
|
num_devices: 2
|
||||||
|
working_dir: "/vllm-workspace"
|
||||||
source_file_dependencies:
|
source_file_dependencies:
|
||||||
- vllm/v1/spec_decode/extract_hidden_states.py
|
- vllm/v1/spec_decode/extract_hidden_states.py
|
||||||
- vllm/model_executor/models/extract_hidden_states.py
|
- vllm/model_executor/models/extract_hidden_states.py
|
||||||
@@ -158,7 +160,7 @@ steps:
|
|||||||
- tests/v1/kv_connector/extract_hidden_states_integration
|
- tests/v1/kv_connector/extract_hidden_states_integration
|
||||||
commands:
|
commands:
|
||||||
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
- export VLLM_WORKER_MULTIPROC_METHOD=spawn
|
||||||
- pytest -v -s -m 'distributed' v1/kv_connector/extract_hidden_states_integration
|
- pytest -v -s -m 'distributed' tests/v1/kv_connector/extract_hidden_states_integration
|
||||||
|
|
||||||
- label: ":nvidia: (H200) Regression"
|
- label: ":nvidia: (H200) Regression"
|
||||||
key: regression
|
key: regression
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import pytest
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from tests.utils import create_new_process_for_each_test, multi_gpu_test
|
from tests.utils import create_new_process_for_each_test, multi_gpu_test
|
||||||
from vllm import LLM, ModelRegistry, SamplingParams
|
from vllm import LLM, SamplingParams
|
||||||
from vllm.distributed.kv_transfer.kv_connector.v1 import (
|
from vllm.distributed.kv_transfer.kv_connector.v1 import (
|
||||||
example_hidden_states_connector,
|
example_hidden_states_connector,
|
||||||
)
|
)
|
||||||
@@ -67,16 +67,12 @@ def predictable_llama_config_path(tmp_path_factory):
|
|||||||
return str(config_dir)
|
return str(config_dir)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture(scope="module", autouse=True)
|
# Need for Python 3.14 compatibility, vLLM with force spawn due to CUDA
|
||||||
def register_predictable_model():
|
# reinitialization, and register will not persist.
|
||||||
"""Register the PredictableLlamaForCausalLM model."""
|
PREDICTABLE_LLAMA_MODEL_CLS = (
|
||||||
from .predictable_llama import PredictableLlamaForCausalLM
|
"tests.v1.kv_connector.extract_hidden_states_integration"
|
||||||
|
".predictable_llama:PredictableLlamaForCausalLM"
|
||||||
if "PredictableLlamaForCausalLM" not in ModelRegistry.get_supported_archs():
|
)
|
||||||
ModelRegistry.register_model(
|
|
||||||
"PredictableLlamaForCausalLM", PredictableLlamaForCausalLM
|
|
||||||
)
|
|
||||||
yield
|
|
||||||
|
|
||||||
|
|
||||||
def test_extract_hidden_states_with_predictable_dummy_model(
|
def test_extract_hidden_states_with_predictable_dummy_model(
|
||||||
@@ -104,6 +100,9 @@ def test_extract_hidden_states_with_predictable_dummy_model(
|
|||||||
|
|
||||||
llm = LLM(
|
llm = LLM(
|
||||||
model=predictable_llama_config_path,
|
model=predictable_llama_config_path,
|
||||||
|
model_class_overrides={
|
||||||
|
"PredictableLlamaForCausalLM": PREDICTABLE_LLAMA_MODEL_CLS,
|
||||||
|
},
|
||||||
speculative_config={
|
speculative_config={
|
||||||
"method": "extract_hidden_states",
|
"method": "extract_hidden_states",
|
||||||
"num_speculative_tokens": 1,
|
"num_speculative_tokens": 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user