Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run any scenario #2299

Open
majid5776 opened this issue Jul 21, 2024 · 3 comments
Open

can't run any scenario #2299

majid5776 opened this issue Jul 21, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@majid5776
Copy link

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.

@majid5776 majid5776 added the bug Something isn't working label Jul 21, 2024
@vmoens
Copy link
Contributor

vmoens commented Jul 22, 2024

Can you share your setup (torchrl, pytorch and tensordict) versions?

@majid5776
Copy link
Author

torch: 2.3.1
torchrl: 0.4.0
tensordict: 0.4.0

@vmoens
Copy link
Contributor

vmoens commented Jul 22, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants