You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am trying to make dataset of Ant-v5 and i am getting this error:
$ py create_dataset.py # expert-v0
Traceback (most recent call last):
File "/home/master-andreas/gym/rl/project/create_dataset.py", line 56, in <module>
obs, rew, terminated, truncated, info = collector_env.step(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/master-andreas/gym/rl/project/temp_env/lib/python3.11/site-packages/minari/data_collector/data_collector.py", line 222, in step
self._add_step_data(self._buffer[-1], step_data)
File "/home/master-andreas/gym/rl/project/temp_env/lib/python3.11/site-packages/minari/data_collector/data_collector.py", line 162, in _add_step_data
raise ValueError(
ValueError: Info structure inconsistent with info structure returned by original reset.
for reference: self._reference_info is set using info from reset
Kallinteris-Andreas
changed the title
[Bug Report] Bug title
[Bug Report] step and info structures expected to be identical (when record_infos=True)
Feb 17, 2024
The problem is that Ant-v5 returns some info at reset, but not during step.
If we collect and store inconsistent infos in HDF5 file, we may silently misplace infos during dataset reading (for example assigning the second info to the first step, instead of the second episode reset).
This is why we require infos to have the same structure always. With the current code, you can solve it by defining a StepDataCallback or simply setting record_infos=False (which at this point should be the default to avoid failing on simple envs like Gymnasium-Robotics).
We may want to pad infos automatically in the future, but I don't think it is high priority now
Hey, I am trying to make dataset of
Ant-v5
and i am getting this error:for reference:
self._reference_info
is set usinginfo
fromreset
Minari/minari/data_collector/data_collector.py
Line 261 in 9803a70
which is then compared to the
info
fromreset
Minari/minari/data_collector/data_collector.py
Line 147 in 9803a70
Also in general, it is not in
Env
's specification thatinfo
s need to have the same structure each timehttps://gymnasium.farama.org/main/api/env/#gymnasium.Env.step
@alexdavey @younik
The text was updated successfully, but these errors were encountered: