fiftyone.utils.lerobot_export#

LeRobotDataset v3 export utilities.

Copyright 2017-2026, Voxel51, Inc.

Classes:

LeRobotDatasetExporter(export_dir[,Β ...])

Exports selected logical episodes as a self-contained v3 dataset.

class fiftyone.utils.lerobot_export.LeRobotDatasetExporter(export_dir, export_media=None)#

Bases: BatchDatasetExporter

Exports selected logical episodes as a self-contained v3 dataset.

Parameters:
  • export_dir – the destination dataset root

  • export_media (None) – must be True; this is the only mode that creates a valid LeRobot dataset

Attributes:

Methods:

export_samples(sample_collection[,Β progress])

Exports the given sample collection.

close(*args)

Performs any necessary actions after the last sample has been exported.

export_sample(*args,Β **kwargs)

Exports the given sample to the dataset.

log_collection(sample_collection)

Logs any relevant information about the fiftyone.core.collections.SampleCollection whose samples will be exported.

setup()

Performs any necessary setup before exporting the first sample in the dataset.

supports_media_references = True#
export_samples(sample_collection, progress=None)#

Exports the given sample collection.

Parameters:
  • sample_collection – a fiftyone.core.collections.SampleCollection

  • progress (None) – whether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead

close(*args)#

Performs any necessary actions after the last sample has been exported.

This method is called when the exporter’s context manager interface is exited, DatasetExporter.__exit__().

Parameters:

*args – the arguments to DatasetExporter.__exit__()

export_sample(*args, **kwargs)#

Exports the given sample to the dataset.

Parameters:
  • *args – subclass-specific positional arguments

  • **kwargs – subclass-specific keyword arguments

log_collection(sample_collection)#

Logs any relevant information about the fiftyone.core.collections.SampleCollection whose samples will be exported.

Subclasses can optionally implement this method if their export format can record information such as the fiftyone.core.collections.SampleCollection.info() of the collection being exported.

By convention, this method must be optional; i.e., if it is not called before the first call to export_sample(), then the exporter must make do without any information about the fiftyone.core.collections.SampleCollection (which may not be available, for example, if the samples being exported are not stored in a collection).

Parameters:

sample_collection – the fiftyone.core.collections.SampleCollection whose samples will be exported

setup()#

Performs any necessary setup before exporting the first sample in the dataset.

This method is called when the exporter’s context manager interface is entered, DatasetExporter.__enter__().