# Overview ## Dataset Pipeline Datasets capture recorded environment data and are used as inputs to a given offline RL or IL algorithm in **robomimic**. In general, you can use datasets with **robomimic** by: 1. **Downloading** the desired dataset 2. **Postprocessing** the dataset to guarantee compatibility with robomimic 3. **Training** agent(s) in robomimic with dataset **robomimic** currently supports the following datasets out of the box. Click on the corresponding **(1) Downloading** link to download the dataset and the corresponding **(2) Postprocessing** link for postprocessing that dataset. | **Dataset** |
Create Your Own Environment Wrapper!
If you want to generate your own dataset in a custom environment platform that is not listed above, please see [THIS PAGE](../modules/environments.md#implement-an-environment-wrapper).
- **`data`** (group)
- **`total`** (attribute) - number of state-action samples in the dataset
- **`env_args`** (attribute) - a json string that contains metadata on the environment and relevant arguments used for collecting data. Three keys: `env_name`, the name of the environment or task to create, `env_type`, one of robomimic's supported [environment types](https://github.com/ARISE-Initiative/robomimic/blob/master/robomimic/envs/env_base.py#L9), and `env_kwargs`, a dictionary of keyword-arguments to be passed into the environment of type `env_name`.
- **`demo_0`** (group) - group for the first trajectory (every trajectory has a group)
- **`num_samples`** (attribute) - the number of state-action samples in this trajectory
- **`model_file`** (attribute) - the xml string corresponding to the MJCF MuJoCo model. Only present for robosuite datasets.
- **`states`** (dataset) - flattened raw MuJoCo states, ordered by time. Shape (N, D) where N is the length of the trajectory, and D is the dimension of the state vector. Should be empty or have dummy values for non-robosuite datasets.
- **`actions`** (dataset) - environment actions, ordered by time. Shape (N, A) where N is the length of the trajectory, and A is the action space dimension
- **`rewards`** (dataset) - environment rewards, ordered by time. Shape (N,) where N is the length of the trajectory.
- **`dones`** (dataset) - done signal, equal to 1 if playing the corresponding action in the state should terminate the episode. Shape (N,) where N is the length of the trajectory.
- **`obs`** (group) - group for the observation keys. Each key is stored as a dataset.
- **`
Warning!
Dataset images should be of type `np.uint8` and be stored in channel-last `(H, W, C)` format. This is because: - **(1)** this is a common format that many `gym` environments and all `robosuite` environments return image observations in - **(2)** using `np.uint8` (vs floats) saves space in dataset storage Note that the robosuite observation extraction script (`dataset_states_to_obs.py`) already stores images in the correct format.
Warning!
Actions should be **normalized between -1 and 1**. This is because this range enables easier policy learning via the use of `tanh` layers). The `get_dataset_info.py` script can be used to sanity check stored actions, and will throw an `Exception` if there is a violation.Note!
You can easily list the filter keys present in a dataset with the `get_dataset_info.py` script (see [this link](../tutorials/dataset_contents.html#view-dataset-structure-and-videos)), and you can even pass a `--verbose` flag to list the exact demonstrations that each filter key corresponds to.