facebookresearch / agenthive

AgentHive provides the primitives and helpers for a seamless usage of robohive within TorchRL.
30 stars 4 forks source link

Error in creating transformed env with R3M #8

Closed ShahRutav closed 1 year ago

ShahRutav commented 1 year ago

After the recent pull, creating transformed env with R3M leads to this error:

Traceback (most recent call last):
  File "test.py", line 26, in <module>
    td = env.rand_step()
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/common.py", line 540, in rand_step
    return self.step(tensordict)
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/common.py", line 343, in step
    obs_keys = set(self.observation_spec.keys())
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/transforms/transforms.py", line 407, in observation_spec
    observation_spec = self.transform.transform_observation_spec(
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/transforms/transforms.py", line 662, in transform_observation_spec
    observation_spec = t.transform_observation_spec(observation_spec)
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/transforms/transforms.py", line 662, in transform_observation_spec
    observation_spec = t.transform_observation_spec(observation_spec)
  File "/home/rutavms/research/robohive/latest/rl/torchrl/envs/transforms/r3m.py", line 95, in transform_observation_spec
    observation_spec = CompositeSpec(**observation_spec)
TypeError: __new__() keywords must be strings

Here's a simple script that reproduces the error.

vmoens commented 1 year ago

closed by https://github.com/pytorch/rl/pull/830