Fix CompilationConfig repr (#19091)
Signed-off-by: rzou <zou3519@gmail.com>
This commit is contained in:
@@ -6,6 +6,7 @@ from typing import Literal, Union
|
||||
|
||||
import pytest
|
||||
|
||||
from vllm.compilation.backends import VllmBackend
|
||||
from vllm.config import (LoadConfig, ModelConfig, PoolerConfig, VllmConfig,
|
||||
config, get_field)
|
||||
from vllm.model_executor.layers.pooler import PoolingType
|
||||
@@ -44,6 +45,18 @@ def test_config(test_config, expected_error):
|
||||
config(test_config)
|
||||
|
||||
|
||||
def test_compile_config_repr_succeeds():
|
||||
# setup: VllmBackend mutates the config object
|
||||
config = VllmConfig()
|
||||
backend = VllmBackend(config)
|
||||
backend.configure_post_pass()
|
||||
|
||||
# test that repr(config) succeeds
|
||||
val = repr(config)
|
||||
assert 'VllmConfig' in val
|
||||
assert 'inductor_passes' in val
|
||||
|
||||
|
||||
def test_get_field():
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in New Issue
Block a user