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
Describe the bug
As the title says, when applying d4rl.sequence_dataset on a v2 environment of d4rl-mujoco, you get an error of:
IndexError Traceback (most recent call last)
Cell In [1], line 5
3 env = gym.make('walker2d-medium-replay-v2')
4 dataset = d4rl.sequence_dataset(env)
----> 5 dataset = list(dataset)
File ~/miniconda3/envs/video-pretraining/lib/python3.9/site-packages/d4rl/__init__.py:175, in sequence_dataset(env, dataset, **kwargs)
172 final_timestep = (episode_step == env._max_episode_steps - 1)
174 for k in dataset:
--> 175 data_[k].append(dataset[k][i])
177 if done_bool or final_timestep:
178 episode_step = 0
IndexError: invalid index to scalar variable.
Looked slight deeper, the bug is triggered since there are metadatas in the v2 datasets which are not arrays. An easy solution to this problem is to skip any keys that start with metadata/. But I am not sure that is the intended behaviour of this library.
Describe the bug
As the title says, when applying
d4rl.sequence_dataset
on av2
environment of d4rl-mujoco, you get an error of:Looked slight deeper, the bug is triggered since there are metadatas in the
v2
datasets which are not arrays. An easy solution to this problem is to skip any keys that start withmetadata/
. But I am not sure that is the intended behaviour of this library.Code example
System Info
Describe the characteristic of your environment:
D4RL
is installed bypip install git+https://github.com/Farama-Foundation/d4rl@master#egg=d4rl
Additional context
no.
Checklist
The text was updated successfully, but these errors were encountered: