openai / gym

A toolkit for developing and comparing reinforcement learning algorithms.
https://www.gymlibrary.dev
Other
34.5k stars 8.59k forks source link

[Question] Website documentation not matching latest version #2881

Closed BlueskyFR closed 2 years ago

BlueskyFR commented 2 years ago

Question

Hi! The gym website, in the env creation section, shows this line:

from gym.utils.renderer import Renderer

However, this is an unreleased feature which is not yet available in the latest (0.24.1) version so it is not really possible to follow along correctly. Is there something I am missing? I did not find the option to view the documentation in a specific version btw.

Thanks in advance!

younik commented 2 years ago

Hello, we are aware of this issue (https://github.com/openai/gym/issues/2825); hopefully, the documentation in the future will include versioning (https://github.com/Farama-Foundation/gym-docs/issues/139)

The documentation on the gym website is now referring to the source; thus those codes will work if you install gym from source Sorry for the confusion!

Markus28 commented 2 years ago

Please check out https://github.com/Farama-Foundation/gym-examples for the environment code that works with the current gym version.

FinAminToastCrunch commented 2 years ago

@Markus28 unfortunately, your solution did not work for me. I still get an error when I try: `from gym.utils.renderer import Renderer ` I get

`--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) Input In [119], in <cell line: 3>() 1 import gym 2 from gym import spaces ----> 3 from gym.utils.renderer import Renderer 4 import pygame 5 import numpy as np

ModuleNotFoundError: No module named 'gym.utils.renderer'`

Markus28 commented 2 years ago

Yes, Gym 0.25 was released a few days ago and we updated the examples/documentation accordingly. The new example code should work with Gym 0.25 but it's not backward compatible. Note that some significant API changes were introduced in Gym 0.25. You can check out an older commit from gym-examples if you really want to use an old Gym version.

jkterry1 commented 2 years ago

Hey, I beleive this is fixed, but please let us know if it isn't