Lerobot¶
dataphy.dataset.lerobot
¶
LeRobot dataset loader for Dataphy SDK.
Classes¶
LeRobotDatasetLoader(dataset_path: Union[str, Path], **kwargs: Any)
¶
Bases: BaseDatasetLoader
Loader for LeRobot datasets from Hugging Face Hub.
This loader supports LeRobot dataset formats including both local files and Hugging Face Hub datasets. It handles various dataset structures including chunked parquet files, video directories, and metadata files.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dataset_path
|
Union[str, Path]
|
Path to the LeRobot dataset directory |
required |
**kwargs
|
Any
|
Additional arguments passed to base class |
{}
|
Source code in src/dataphy/dataset/lerobot.py
Attributes¶
episode_files = []
instance-attribute
¶
episode_info = {}
instance-attribute
¶
dataset_path = Path(dataset_path)
instance-attribute
¶
kwargs = kwargs
instance-attribute
¶
Functions¶
load_info() -> DatasetInfo
¶
Load dataset information.
Returns:
| Type | Description |
|---|---|
DatasetInfo
|
DatasetInfo object containing metadata about the dataset |
Source code in src/dataphy/dataset/lerobot.py
get_episode(episode_id: str) -> Episode
¶
Get a specific episode by ID.
Source code in src/dataphy/dataset/lerobot.py
list_episodes() -> List[str]
¶
get_dataset_info() -> Dict[str, Any]
¶
Get dataset information as a dictionary (for CLI compatibility).
Source code in src/dataphy/dataset/lerobot.py
get_episodes(episode_ids: Optional[List[str]] = None) -> List[Episode]
¶
Get multiple episodes.
Source code in src/dataphy/dataset/lerobot.py
get_timestep(episode_id: str, timestep: int) -> Dict[str, Any]
¶
Get a specific timestep from an episode.
Source code in src/dataphy/dataset/lerobot.py
get_timesteps(episode_id: str, start: int, end: int) -> List[Dict[str, Any]]
¶
Get a range of timesteps from an episode.
get_episode_ids() -> List[str]
¶
get_random_episode() -> Episode
¶
get_random_timestep() -> Tuple[str, int, Dict[str, Any]]
¶
Get a random timestep from a random episode.