NM512 / dreamerv3-torch

Implementation of Dreamer v3 in pytorch.
MIT License
382 stars 81 forks source link

AttributeError: 'numpy.ndarray' object has no attribute 'items'. Did you mean: 'item'? #63

Open nullonesix opened 1 month ago

nullonesix commented 1 month ago

i'm trying to connect dreamerv3 to a unity environment (which provides a gym interface) but i get the following error:

Logdir logdir\unity
Create envs.
config.envs: 1
make_env()
suite == unity
C:\Users\nullo\AppData\Local\Programs\Python\Python310\lib\site-packages\gym\spaces\box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float32
  logger.warn(f"Box bound precision lowered by casting to {self.dtype}")
Action Space Box(-1.0, 1.0, (5,), float32)
Prefill dataset (2500 steps).
Traceback (most recent call last):
  File "C:\Users\nullo\Documents\dreamerv3-torch\dreamer.py", line 376, in <module>
    main(parser.parse_args(remaining))
  File "C:\Users\nullo\Documents\dreamerv3-torch\dreamer.py", line 283, in main
    state = tools.simulate(
  File "C:\Users\nullo\Documents\dreamerv3-torch\tools.py", line 158, in simulate
    t = {k: convert(v) for k, v in t.items()}
AttributeError: 'numpy.ndarray' object has no attribute 'items'. Did you mean: 'item'?
nullonesix commented 1 month ago

i get the same issue with CartPoleContinuous-v1..