Minari
Minari copied to clipboard
[Bug Report] step and info structures expected to be identical (when `record_infos=True`)
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
https://github.com/Farama-Foundation/Minari/blob/9803a700bdba1e228e335de5422511edbfb4c74e/minari/data_collector/data_collector.py#L261
which is then compared to the info
from reset
https://github.com/Farama-Foundation/Minari/blob/9803a700bdba1e228e335de5422511edbfb4c74e/minari/data_collector/data_collector.py#L147
Also in general, it is not in Env
's specification that info
s need to have the same structure each time
https://gymnasium.farama.org/main/api/env/#gymnasium.Env.step
@alexdavey @younik