Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lerobot/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from pathlib import Path
from pprint import pformat

import draccus
import numpy as np
import rerun as rr

Expand Down Expand Up @@ -151,6 +150,11 @@ def __post_init__(self):
self.policy = PreTrainedConfig.from_pretrained(policy_path, cli_overrides=cli_overrides)
self.policy.pretrained_path = policy_path

@classmethod
def __get_path_fields__(cls) -> list[str]:
"""This enables the parser to load config from the policy using `--policy.path=local/dir`"""
return ["policy"]


@safe_stop_image_writer
def record_loop(
Expand Down Expand Up @@ -220,7 +224,7 @@ def record_loop(
break


@draccus.wrap()
@parser.wrap()
def record(cfg: RecordConfig) -> LeRobotDataset:
init_logging()
logging.info(pformat(asdict(cfg)))
Expand Down
Loading