can't run any scenario
majid5776 opened this issue · 3 comments
Hello. why this error happened when I want to run this script: python mappo_ippo.py --m env.scenario_name=balance
Describe the bug
Traceback (most recent call last):
File "mappo_ippo.py", line 123, in train
collector = SyncDataCollector(
File "D:\RL\MARL\MARL\lib\site-packages\torchrl\collectors\collectors.py", line 703, in init
policy_output = self.policy(policy_input)
File "D:\RL\MARL\MARL\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\common.py", line 289, in wrapper
return func(_self, tensordict, *args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict_contextlib.py", line 126, in decorate_context
return func(*args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\utils.py", line 261, in wrapper
return func(_self, tensordict, *args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\probabilistic.py", line 577, in forward
return self.module[-1](tensordict_out, _requires_sample=self._requires_sample)
File "D:\RL\MARL\MARL\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
return forward_call(*args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\common.py", line 289, in wrapper
return func(_self, tensordict, *args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict_contextlib.py", line 126, in decorate_context
return func(*args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\utils.py", line 261, in wrapper
return func(_self, tensordict, *args, **kwargs)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\probabilistic.py", line 390, in forward
dist = self.get_dist(tensordict)
File "D:\RL\MARL\MARL\lib\site-packages\tensordict\nn\probabilistic.py", line 349, in get_dist
raise TypeError(
TypeError: distribution keywords and tensordict keys indicated by ProbabilisticTensorDictModule.dist_keys must match.Got this error message:
init() got an unexpected keyword argument 'low'
with dist_keys=[('agents', 'loc'), ('agents', 'scale')]
Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.
Can you share your setup (torchrl, pytorch and tensordict) versions?
torch: 2.3.1
torchrl: 0.4.0
tensordict: 0.4.0
I think it's because you're running the examples on main but they've been updated with the low/high entries in the examples.
You can upgrade to nightlies or alternatively use the examples from the 0.4 tag
https://github.com/pytorch/rl/tree/v0.4.0