mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-31 05:29:40 +00:00
Support task replacement mappings in modify_tasks
Part of #2326. Signed-off-by: 陈伟 <woshei0a0a0a@qq.com>
This commit is contained in:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user