pub struct LeRobotDatasetInfo {Show 13 fields
pub robot_type: String,
pub codebase_version: String,
pub total_episodes: usize,
pub total_frames: usize,
pub total_tasks: usize,
pub total_videos: usize,
pub total_chunks: usize,
pub chunks_size: usize,
pub data_path: String,
pub video_path: Option<String>,
pub image_path: Option<String>,
pub fps: usize,
pub features: HashMap<String, Feature>,
}
Expand description
LeRobot
dataset metadata.
This struct contains the metadata for a LeRobot
dataset, and is loaded from the meta/info.json
file
of the dataset.
Fields§
§robot_type: String
The type of the robot.
codebase_version: String
The version of the LeRobot
codebase the dataset was created for.
total_episodes: usize
The total number of unique episodes in the dataset.
total_frames: usize
The total number of unique frames in the dataset.
total_tasks: usize
The total number of unique tasks in the dataset.
total_videos: usize
The total amount of videos in the dataset.
total_chunks: usize
The total number of unique chunks in the dataset.
chunks_size: usize
The amount of episodes per chunk.
This is used to determine the path to video and data files.
data_path: String
The path template for accessing episode data files.
video_path: Option<String>
The path template for accessing video files for an episode.
image_path: Option<String>
The path template for accessing image files for an episode.
fps: usize
The frame rate of the recorded episode data.
features: HashMap<String, Feature>
A mapping of feature names to their respective Feature
definitions.
Implementations§
Source§impl LeRobotDatasetInfo
impl LeRobotDatasetInfo
Sourcepub fn load_from_json_file(
filepath: impl AsRef<Path>,
) -> Result<Self, LeRobotError>
pub fn load_from_json_file( filepath: impl AsRef<Path>, ) -> Result<Self, LeRobotError>
Loads LeRobotDatasetInfo
from a JSON file.
The LeRobot
dataset info file is typically stored under meta/info.json
.
Sourcepub fn feature(&self, feature_key: &str) -> Option<&Feature>
pub fn feature(&self, feature_key: &str) -> Option<&Feature>
Retrieve the metadata for a specific feature.
Sourcepub fn chunk_index(&self, episode: EpisodeIndex) -> Result<usize, LeRobotError>
pub fn chunk_index(&self, episode: EpisodeIndex) -> Result<usize, LeRobotError>
Computes the storage chunk index for a given episode.
Episodes are organized into chunks to optimize storage and retrieval. This method determines which chunk a specific episode belongs to based on the dataset’s chunk size.
Sourcepub fn episode_data_path(
&self,
episode: EpisodeIndex,
) -> Result<PathBuf, LeRobotError>
pub fn episode_data_path( &self, episode: EpisodeIndex, ) -> Result<PathBuf, LeRobotError>
Generates the file path for a given episode’s Parquet data.
Sourcepub fn video_path(
&self,
feature_key: &str,
episode: EpisodeIndex,
) -> Result<PathBuf, LeRobotError>
pub fn video_path( &self, feature_key: &str, episode: EpisodeIndex, ) -> Result<PathBuf, LeRobotError>
Generates the file path for a video observation of a given episode.
Trait Implementations§
Source§impl Clone for LeRobotDatasetInfo
impl Clone for LeRobotDatasetInfo
Source§fn clone(&self) -> LeRobotDatasetInfo
fn clone(&self) -> LeRobotDatasetInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for LeRobotDatasetInfo
impl Debug for LeRobotDatasetInfo
Source§impl<'de> Deserialize<'de> for LeRobotDatasetInfo
impl<'de> Deserialize<'de> for LeRobotDatasetInfo
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for LeRobotDatasetInfo
impl RefUnwindSafe for LeRobotDatasetInfo
impl Send for LeRobotDatasetInfo
impl Sync for LeRobotDatasetInfo
impl Unpin for LeRobotDatasetInfo
impl UnwindSafe for LeRobotDatasetInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request