Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Error in running set_info_dict_reader #6

@ShahRutav

Description

@ShahRutav

While running the code, it leads to an error:

Traceback (most recent call last):
  File "test.py", line 24, in <module>
    env = env.set_info_dict_reader(info_dict_reader=reader)
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/gym_like.py", line 284, in set_info_dict_reader
    self.observation_spec[info_key] = spec
  File "/home/rutavms/research/robohive/latest/rl/torchrl/data/tensor_specs.py", line 1257, in __setitem__
    raise RuntimeError(
RuntimeError: Setting a new attribute (solved) on another device (cpu against cuda:0). All devices of CompositeSpec must match.

I locally fixed in torchRL by simply adding spec.to(self.device) here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions