-
Notifications
You must be signed in to change notification settings - Fork 644
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
[HANDS-ON BUG] The environment CartPole-v1
used in unit 4 has weird configurations
#468
Comments
Hmmmmm, it seems that the code runs well on Colab but not locally!! |
Hey there 👋 sorry for the delay. But you're the first to encounter this issue. That might be also the version of Cartpole you use. For this we use Gym not Gymnasium "You may be wondering why we install gym and not gymnasium, a more recent version of gym? Because the gym-games we are using are not updated yet with gymnasium." |
No problem at all, as I said the problem comes when running this code locally, dk why, maybe I made a mistake. |
I think it's because you might not use the same environment. Unit 4 uses gym == 0.21 not gymnasium 😄 |
Hmmm, you may be right yeah, I will check and confirm. |
Hey there 👋 Did you found if it was because of that? |
Sorry for being late, yeah, it is definitely because of inconsistent versions so I am closing this. |
Even I have been running this locally and using gymnasium. I made respective changes for env.reset() and env.step(action). Training and evaluation went fine. However, I am struck at record_video() while pushing to Hub. I get an error "The image must have at least two spatial dimensions". I did change eval_env to include render_mode. Any suggestions ? |
Restarted the system / notebook and this error does not show up. However, "push to hub" process takes up all the memory and finally crashes. |
Describe the bug
Try to run the original notebook failed.
env.reset()
returns a tuple of two items forCartPole-v1
only. We expect only the state.env.step(action)
returns a tuple of 5 items forCartPole-v1
only. We expect only 4 items in the tuple.record_video()
function fails forCartPole-v1
environment only for some reason.Material
I didn't use Google Colab and here is my OS info:
The text was updated successfully, but these errors were encountered: