[Bugfix][Model] Validate DefaultModelLoader / LoadConfig and fail with clear errors (#45196)
Signed-off-by: Ting Sun <suntcrick@gmail.com>
This commit is contained in:
@@ -1557,3 +1557,14 @@ def test_ir_op_priority_ctx():
|
||||
# context restored even after exception
|
||||
assert ir.ops.rms_norm.get_priority() == ["vllm_c", "native"]
|
||||
assert ir.ops.fused_add_rms_norm.get_priority() == ["native"]
|
||||
|
||||
|
||||
def test_load_config_rejects_invalid_safetensors_load_strategy():
|
||||
with pytest.raises(pydantic.ValidationError):
|
||||
LoadConfig(safetensors_load_strategy="not_a_real_strategy")
|
||||
|
||||
|
||||
@pytest.mark.parametrize("bad_load_format", [None, 123])
|
||||
def test_load_config_rejects_non_string_load_format(bad_load_format):
|
||||
with pytest.raises(pydantic.ValidationError):
|
||||
LoadConfig(load_format=bad_load_format)
|
||||
|
||||
Reference in New Issue
Block a user