Farama-Foundation / Minari

A standard format for offline reinforcement learning datasets, with popular reference datasets and related utilities
https://minari.farama.org
Other
266 stars 42 forks source link

[Bug Report] Incorrect observation shape in some antmaze-umaze-v0 episodes #199

Closed cpnota closed 5 months ago

cpnota commented 6 months ago

Describe the bug According to the documentation, the shape of the observation should be num_steps + 1. However, for a handful of episodes, the length is num_steps.

Code example

import minari

dataset = minari.load_dataset("antmaze-umaze-v0", download=True)

for episode_data in dataset.iterate_episodes():
    if episode_data.observations["observation"].shape[0] == episode_data.total_timesteps:
        print("Warning: bad episode")

Output:

Warning: bad episode
Warning: bad episode
Warning: bad episode
Warning: bad episode

System Info Describe the characteristic of your environment:

Additional context I haven't checked the other Ant environments.

Checklist

alexdavey commented 6 months ago

Thank you for spotting this! It appears that there was an issue with the DataCollector code that was used to generate this dataset. I am currently working on a new version of the antmaze datasets to fix this issue.

alexdavey commented 5 months ago

A new v1 version of the antmaze datasets (e.g. "antmaze-umaze-v1") has been released to fix this issue.

The new datasets are otherwise statistically very similar to the old v0 datasets, so should be a drop-in replacement for most purposes. See here for a comparison with the previous version.