mani_skill.trajectory.dataset#

Classes#

ManiSkillTrajectoryDataset

A general torch Dataset you can drop in and use immediately with just about any trajectory .h5 data generated from ManiSkill.

Functions#

load_h5_data(data)

Module Contents#

class mani_skill.trajectory.dataset.ManiSkillTrajectoryDataset(dataset_file, load_count=-1, success_only=False, device=None)[source]#

Bases: torch.utils.data.Dataset

A general torch Dataset you can drop in and use immediately with just about any trajectory .h5 data generated from ManiSkill. This class simply is a simple starter code to load trajectory data easily, but does not do any data transformation or anything advanced. We recommend you to copy this code directly and modify it for more advanced use cases

Parameters:
  • dataset_file (str) – path to the .h5 file containing the data you want to load

  • load_count (int) – the number of trajectories from the dataset to load into memory. If -1, will load all into memory

  • success_only (bool) – whether to skip trajectories that are not successful in the end. Default is false

  • device – The location to save data to. If None will store as numpy (the default), otherwise will move data to that device

__getitem__(idx)[source]#
__len__()[source]#
actions = [][source]#
data[source]#
dataset_file[source]#
device = None[source]#
env_id[source]#
env_info[source]#
env_kwargs[source]#
episodes[source]#
json_data[source]#
obs = None[source]#
terminated = [][source]#
truncated = [][source]#
mani_skill.trajectory.dataset.load_h5_data(data)[source]#