Skip to content

create_zarr_from_hdf5

create_zarr_from_hdf5

Creates a Zarr-based replay buffer dataset from HDF5 files (e.g., LIBERO).

create_replay_buffer_from_hdf5

create_replay_buffer_from_hdf5(schema)

Creates a Zarr-based replay buffer from multiple HDF5 files.

Parameters:

Name Type Description Default
schema Hdf5DatasetSchema

Hdf5DatasetSchema instance with HDF5 paths and zarr path configured

required
Source code in src/versatil/data/preprocessing/create_zarr_from_hdf5.py
def create_replay_buffer_from_hdf5(schema: Hdf5DatasetSchema) -> None:
    """Creates a Zarr-based replay buffer from multiple HDF5 files.

    Args:
        schema: Hdf5DatasetSchema instance with HDF5 paths and zarr path configured
    """
    total_episodes = _count_hdf5_episodes(schema=schema)
    episodes = _iter_hdf5_episodes(schema=schema)

    create_zarr_replay_buffer(
        schema=schema,
        episodes=episodes,
        total_episodes=total_episodes,
    )