My custom PettingZoo env is working with DQNPolicy but not with PPOPolicy : AttributeError: 'str' object has no attribute 'ndim' #1043
Unanswered
yannKerzreho
asked this question in
Q&A
Replies: 1 comment
-
|
See #692 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello! I am trying to creat a env simulating a market, I have tianshou - 0.5.1 and pettingzoo - 1.24.3.
I can run DQNPolicy without problem, but when i am trying to implement a PPOPolicy (with onpolicy_trainer or even directly with train_collector.collect() and policy.update()) it return :
AttributeError: 'str' object has no attribute 'ndim'The problem come from :
result = self.policy(self.data, last_state)but i don't understand why, plus it works with the DQN !The error and the code can be found here :
https://www.dropbox.com/scl/fi/kmvadgstkdte5ve81lcw9/PRBLM-Jupyter-Notebook.html?rlkey=ob3rcluxy7jlrdh9po6ulxeqs&dl=0
Thank you very much for your help!
Else, here is my environment,
And I re-used some function and syntax from tutorials,
Beta Was this translation helpful? Give feedback.
All reactions