[Refactor] Remove legacy stage_args YAML loader (#6200)
Signed-off-by: zwhzzz0821 <2831474076@qq.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
9d2bb23ff6
commit
baba7d1e2e
12 files changed
+73
-164
No files matched your search
@@ -492,6 +492,24 @@ def test_resolve_stage_configs_injects_additional_config_into_diffusion_stage(mo
|
||||
assert stage_configs[1].engine_args.additional_config == {"torchair_graph_config": {"enabled": True}}
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("legacy_arg", "value"),
|
||||
[
|
||||
("stage_configs_path", "legacy.yaml"),
|
||||
("stage_configs", [{"stage_id": 0}]),
|
||||
],
|
||||
)
|
||||
def test_resolve_stage_configs_rejects_legacy_config_arguments(legacy_arg, value):
|
||||
engine = AsyncOmniEngine.__new__(AsyncOmniEngine)
|
||||
|
||||
with pytest.raises(ValueError, match=rf"`{legacy_arg}`.*`deploy_config`"):
|
||||
engine._resolve_stage_configs(
|
||||
"dummy-model",
|
||||
{legacy_arg: value},
|
||||
trust_remote_code=False,
|
||||
)
|
||||
|
||||
|
||||
def test_default_stage_config_includes_quantization_config():
|
||||
"""Ensure structured quantization_config survives default diffusion-stage creation."""
|
||||
quantization_config = {
|
||||
|
||||
Reference in new issue
Block a user