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

RL Examples had bugs on current gym version #1213

Open
1 task
sanggusti opened this issue Jan 10, 2024 · 0 comments
Open
1 task

RL Examples had bugs on current gym version #1213

sanggusti opened this issue Jan 10, 2024 · 0 comments

Comments

@sanggusti
Copy link

sanggusti commented Jan 10, 2024

Your issue may already be reported!
Please search on the issue tracker before creating one.

Context

  • Pytorch version:
  • Operating System and version: Ubuntu 20

Your Environment

  • Installed using source? [yes/no]:
  • Are you planning to deploy it using docker container? [yes/no]:
  • Is it a CPU or GPU environment?:
  • Which example are you using: reinforcement_learning
  • Link to code or data to repro [if any]:

Expected Behavior

This example script (reinforce.py and actor_critic.py) should be running well without encountering any bugs.

Current Behavior

When running the script (reinforce.py and actor_critic.py), there are error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[<ipython-input-8-263240bbee7e>](https://localhost:8080/#) in <cell line: 1>()
----> 1 main()

[<ipython-input-4-6af08085b221>](https://localhost:8080/#) in main()
     87     running_reward = 10
     88     for i_episode in count(1):
---> 89         state, _ = env.reset()
     90         ep_reward = 0
     91         for t in range(1, 10000):  # Don't infinite loop while learning

ValueError: too many values to unpack (expected 2)

Possible Solution

Here I put my pull request that run on my system (gym version 0.25.2)
#1212

Steps to Reproduce

  1. Go to folder reinforcement_learning
  2. run actor_critic.py or reinforce.py with gym version 0.25.2
    ...

Failure Logs [if any]

Tasks

Preview Give feedback
  1. cla signed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant