mani_skill.trajectory.dataset ============================= .. py:module:: mani_skill.trajectory.dataset Classes ------- .. autoapisummary:: mani_skill.trajectory.dataset.ManiSkillTrajectoryDataset Functions --------- .. autoapisummary:: mani_skill.trajectory.dataset.load_h5_data Module Contents --------------- .. py:class:: ManiSkillTrajectoryDataset(dataset_file, load_count=-1, success_only = False, device=None) Bases: :py:obj:`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 :param dataset_file: path to the .h5 file containing the data you want to load :type dataset_file: str :param load_count: the number of trajectories from the dataset to load into memory. If -1, will load all into memory :type load_count: int :param success_only: whether to skip trajectories that are not successful in the end. Default is false :type success_only: bool :param device: The location to save data to. If None will store as numpy (the default), otherwise will move data to that device .. py:method:: __getitem__(idx) .. py:method:: __len__() .. py:attribute:: actions :value: [] .. py:attribute:: data .. py:attribute:: dataset_file .. py:attribute:: device :value: None .. py:attribute:: env_id .. py:attribute:: env_info .. py:attribute:: env_kwargs .. py:attribute:: episodes .. py:attribute:: json_data .. py:attribute:: obs :value: None .. py:attribute:: terminated :value: [] .. py:attribute:: truncated :value: [] .. py:function:: load_h5_data(data)