Support task replacement mappings in modify_tasks

Part of #2326.

Signed-off-by: 陈伟 <woshei0a0a0a@qq.com>
This commit is contained in:
vvezre
2026-03-12 13:20:46 +08:00
committed by CarolinePascal
parent 40a5e70352
commit c1caa512ef
5 changed files with 207 additions and 10 deletions
@@ -105,6 +105,23 @@ class TestOperationTypeParsing:
resolved_name = OperationConfig.get_choice_name(type(cfg.operation))
assert resolved_name == type_name
def test_modify_tasks_replacements_args_parse(self):
cfg = parse_cfg(
[
"--repo_id",
"test/repo",
"--operation.type",
"modify_tasks",
"--operation.task_replacements",
'{"task_0": "pick cube", "task_1": "place cube"}',
]
)
assert isinstance(cfg.operation, ModifyTasksConfig)
assert cfg.operation.task_replacements == {
"task_0": "pick cube",
"task_1": "place cube",
}
class TestDepthEncoderParsing:
"""Test that the depth encoder is exposed and parsed for video operations."""