Open Sisyphus192 opened 1 year ago
Ok, after some more testing this appears to be an issue with python 3.9+
The run_rl.py
works fine on python 3.8, with latest versions of rl_card + pettingzoo
I had originally tested several combinations of versions of rl_card + pettingzoo in python 3.9, 3.10, and 3.11.
I don't know if this is a rl_card + pettingzoo compatibility issue with python 3.9+ or is coming from some changed behavior in torch in python 3.9+.
@Sisyphus192 Thanks for posting this. The update of Numpy causes this. I have just fixed the issue in the master branch. The PyPi version will also be updated soon.
Hello, how to solve this problem when running code?
question: File "D:\lq_rlcard\rlcards\agents\dqn_agent.py", line 422, in sample return tuple(map(np.array, samples[:-1])) + (samples[-1],) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (32,) + inhomogeneous part.
@Walhalla-Summary Could you provide more details about how to reproduce the results?
@Walhalla-Summary What version of rlcard and numpy are you using?
@Sisyphus192 I use the latest version of rlcard, numpy=1.24, and Python version is 3.10
I can't replicate this with rlcard's dqn_agent on python 3.10 and numpy 1.24. I suspect the issue lies with your changes to the dqn_agent, can you provide more details about how to reproduce this error?
Trying to run
run_rl.py
pettingzoo example and I get the following error: