Farama-Foundation/Minari

[Bug Report] Infos in existing dataset lost reset info.

im-Kitsch opened this issue · 1 comments

Describe the bug

Hi, glad to know that the info in dataset is also iteratable now. However, I just find that the existing dataset just lost the info when every time the environment is reset.

Acoording to the current data collection standard, https://minari.farama.org/content/dataset_standards/#additional-information-formatting, the collector will collect info while env.reset() and every time env.step(), i.e. it should satisfy: len(observations) == len(info[xxx]), however, I tested some datasets, it only satisifes len(actions) == len(info[xxx]), I guess it may related to d4rl, while d4rl released, env.reset() doesn't return any infos.

We may need to fix this issue.

Code example
I tested two datasets, but other should be same:

for name in ['door-human-v1', 'hammer-expert-v1']:
  dt = minari.load_dataset(name)
  obs =  dt[1].observations
  act = dt[1].observations
  info = dt[1].infos
  info_key = list(info.keys()][0]
  info_i = info[info_key]
  print(len(info_i) == len(act))
  print(len(info_i) == len(obs))

System Info
I thinks this is not important to report system info for this issue

Checklist

  • I have checked that there is no similar issue in the repo (required)
younik commented

Thanks for the report @im-Kitsch!

The problem is that these environments don't return the info at reset, but they return only a step (successkey), this is why the reset info is missing.
However, in D4RL, other keys provide info on the current state (e.g. qpos, qvel). I am happy to accept a contribution that adds these keys to these datasets.