LeRobot documentation

Cấu hình

You are viewing main version, which requires installation from source. If you'd like regular pip install, checkout the latest stable version (v0.6.1).
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Cấu hình

Cấu hình LeRobot là các dataclass thuần được phân tích bởi draccus, do đó mọi trường đều có thể được đặt từ CLI. TrainPipelineConfig là đối tượng cấp cao nhất cho lerobot-train.

Cấu hình đa hình (chính sách, robot, môi trường) sử dụng draccus.ChoiceRegistry: một lớp con tự đăng ký với @register_subclass("name") và sau đó có thể được chọn bằng tên đó trên dòng lệnh.

TrainPipelineConfig

lớp lerobot.configs.train.TrainPipelineConfig

< >

( dataset: DatasetConfigenv: lerobot.envs.configs.EnvConfig | None = Nonepolicy: lerobot.configs.policies.PreTrainedConfig | None = Nonereward_model: lerobot.configs.rewards.RewardModelConfig | None = Noneoutput_dir: pathlib.Path | None = Nonejob_name: str | None = Noneresume: bool = Falseseed: int | None = 1000cudnn_deterministic: bool = Falsetf32: bool | None = Truenum_workers: int = 4batch_size: int = 8prefetch_factor: int = 4persistent_workers: bool = Truedataloader_multiprocessing_context: str | None = 'spawn'steps: int = 100000env_eval_freq: int = 20000log_freq: int = 200eval_steps: int = 0max_eval_samples: int = 0tolerance_s: float = 0.0001save_checkpoint: bool = Truesave_freq: int = 20000checkpoint_format: CheckpointFormat = <CheckpointFormat.SAFETENSORS: 'safetensors'>use_policy_training_preset: bool = Trueoptimizer: lerobot.optim.optimizers.OptimizerConfig | None = Nonescheduler: lerobot.optim.schedulers.LRSchedulerConfig | None = Noneparallelism: ParallelismConfig = <factory>accelerator: AcceleratorConfig = <factory>eval: EvalConfig = <factory>ema: lerobot.optim.ema.EMAConfig | None = Nonetrackio: TrackioConfig = <factory>peft: lerobot.configs.default.PeftConfig | None = Nonejob: JobConfig = <factory>save_checkpoint_to_hub: bool = Falsesample_weighting: lerobot.utils.sample_weighting.SampleWeightingConfig | None = Nonerename_map: dict = <factory> )

PreTrainedConfig

lớp lerobot.configs.PreTrainedConfig

< >

( n_obs_steps: int = 1input_features: dict[str, lerobot.configs.types.PolicyFeature] | None = <factory>output_features: dict[str, lerobot.configs.types.PolicyFeature] | None = <factory>device: str | None = Nonedtype: torch.dtype | None = Noneuse_amp: bool = Falseuse_peft: bool = Falsepush_to_hub: bool = Truerepo_id: str | None = Noneprivate: bool | None = Nonetags: list[str] | None = Nonelicense: str | None = Nonepretrained_path: pathlib.Path | None = Nonepretrained_revision: str | None = None )

Tham số

  • n_obs_steps — Số bước môi trường của các quan sát cần truyền cho chính sách (bao gồm bước hiện tại và các bước bổ sung trước đó).
  • input_features — Một từ điển định nghĩa PolicyFeature của dữ liệu đầu vào cho policy. Khóa đại diện cho tên dữ liệu đầu vào, và giá trị là PolicyFeature, bao gồm các thuộc tính FeatureType và shape.
  • output_features — Một từ điển định nghĩa PolicyFeature của dữ liệu đầu ra cho chính sách. Khóa đại diện cho tên dữ liệu đầu ra, và giá trị là PolicyFeature, bao gồm các thuộc tính FeatureType và shape.
  • normalization_mapping — Một từ điển ánh xạ từ một giá trị str của FeatureType (ví dụ: “STATE”, “VISUAL”) sang NormalizationMode tương ứng (ví dụ: NormalizationMode.MIN_MAX)

Lớp cấu hình cơ bản cho các mô hình chính sách.

DatasetConfig

lớp lerobot.configs.DatasetConfig

< >

( repo_id: strrepo_type: str = 'dataset'root: str | None = Noneepisodes: list[int] | None = Noneexclude_episodes: list[int] | None = Noneimage_transforms: ImageTransformsConfig = <factory>revision: str | None = Noneuse_imagenet_stats: bool = Truevideo_backend: str = <factory>return_uint8: bool = Falsedepth_output_unit: str = 'mm'streaming: bool = Falsestreaming_episode_pool_size: int | None = Nonestreaming_sampling_strategy: StreamingSamplingStrategy = <StreamingSamplingStrategy.REMAINING: 'remaining'>streaming_prefetch_episodes: int = 8streaming_byte_budget_gb: float = 8.0streaming_decode_threads: int = 2streaming_decoded_queue_size: int = 8streaming_native_http_connections: int | None = Nonestreaming_native_http_subranges: int = 1streaming_sidecar_lock_timeout_s: float = 1800video_decoder_cache_size: int | None = Noneeval_split: float = 0.0 )

EvalConfig

lớp lerobot.configs.EvalConfig

< >

( n_episodes: int = 50batch_size: int = 0use_async_envs: bool = Truerecording: bool = Falserecording_repo_id: str | None = Nonerecording_private: bool = False )

TrackioConfig

lớp lerobot.configs.TrackioConfig

< >

( enable: bool = Falsedisable_artifact: bool = Trueproject: str = 'lerobot'space_id: str | None = Noneprivate: bool | None = Nonerun_name: str | None = Noneresume: str | None = Nonecapture_console: bool = True )

Theo dõi các lần chạy huấn luyện với Trackio (https://huggingface.co/docs/trackio).

Các run được lưu trong cơ sở dữ liệu SQLite cục bộ tại ~/.cache/huggingface/trackio và xem bằng trackio show --project <project>. Đặt space_id để đồng bộ run với một Hugging Face Space thay vì lưu cục bộ.

Update on GitHub