Hi!
I'd like to add a custom environment. To do this, I first tried to follow the instructions in the PR "[NOMRG] Example: adding custom PettingZoo env #84" to get familiar with the integration of a new environment. However, after cloning the repo and running run.py I get the error:
File "/Users/tommaso/Phd/current_projects/benchmarl_tests/BenchMARL/venv/lib/python3.10/site-packages/torchrl/envs/transforms/transforms.py", line 7484, in _generate_episode_reward_spec raise ValueError( ValueError: The in_key: reward is not present in the reward spec Composite( player: Composite( reward: UnboundedContinuous( shape=torch.Size([1, 3, 1]), space=ContinuousBox( low=Tensor(shape=torch.Size([1, 3, 1]), device=cpu, dtype=torch.float32, contiguous=True), high=Tensor(shape=torch.Size([1, 3, 1]), device=cpu, dtype=torch.float32, contiguous=True)), device=cpu, dtype=torch.float32, domain=continuous), device=cpu, shape=torch.Size([1, 3]), data_cls=None), device=cpu, shape=torch.Size([1]), data_cls=None).
Could you help me with this? I'm using an environment with python 3.10.10, torch 2.9.0, and torchRL 0.10.0.
Thanks in advance!
Hi!
I'd like to add a custom environment. To do this, I first tried to follow the instructions in the PR "[NOMRG] Example: adding custom PettingZoo env #84" to get familiar with the integration of a new environment. However, after cloning the repo and running
run.pyI get the error:File "/Users/tommaso/Phd/current_projects/benchmarl_tests/BenchMARL/venv/lib/python3.10/site-packages/torchrl/envs/transforms/transforms.py", line 7484, in _generate_episode_reward_spec raise ValueError( ValueError: The in_key: reward is not present in the reward spec Composite( player: Composite( reward: UnboundedContinuous( shape=torch.Size([1, 3, 1]), space=ContinuousBox( low=Tensor(shape=torch.Size([1, 3, 1]), device=cpu, dtype=torch.float32, contiguous=True), high=Tensor(shape=torch.Size([1, 3, 1]), device=cpu, dtype=torch.float32, contiguous=True)), device=cpu, dtype=torch.float32, domain=continuous), device=cpu, shape=torch.Size([1, 3]), data_cls=None), device=cpu, shape=torch.Size([1]), data_cls=None).Could you help me with this? I'm using an environment with python 3.10.10, torch 2.9.0, and torchRL 0.10.0.
Thanks in advance!