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

Fix: Update RL examples for recent gym 0.25.2 version #1212

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sanggusti
Copy link

@sanggusti sanggusti commented Jan 10, 2024

There are bugs on env.state() since the current version of gym are having bugs with these examples. This commit is to solve it

Description

There are bugs on env.state() since the current version of gym are having bugs with these examples. This commit is to solve it.

The bug if rl examples run with current script:

---------------------------------------------------------------------------
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)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Feature/Issue validation/testing

Please describe the tests [UT/IT] that you ran to verify your changes and relevant result summary. If this is a bug fix please run run_python_examples.sh before and after your change locally to make sure it works and add the logs here.

  • Logs before change
  • Logs after change

Checklist:

  • Have you added tests that prove your fix is effective or that this example works?
  • Has code been commented, particularly in hard-to-understand areas?
  • Have you made corresponding changes to the documentation?

There are bugs on env.state() since the current version of gym are having bugs with these examples. This commit is to solve it
Copy link

netlify bot commented Jan 10, 2024

Deploy Preview for pytorch-examples-preview canceled.

Name Link
🔨 Latest commit 13db41a
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-examples-preview/deploys/659e97e31e1cd00008feec4a

@sanggusti sanggusti changed the title Feat: Update rl examples Feat: Update RL examples for recent gym version Jan 10, 2024
@sanggusti sanggusti changed the title Feat: Update RL examples for recent gym version Feat: Update RL examples for recent gym 0.25.2 version Jan 10, 2024
@sanggusti sanggusti changed the title Feat: Update RL examples for recent gym 0.25.2 version Fix: Update RL examples for recent gym 0.25.2 version Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants