-
-
Notifications
You must be signed in to change notification settings - Fork 131
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
Updated to Gymnasium v0.26.2
#72
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make the suggested changes.
Is there a test that runs check_env with all of the miniworld envs ?
This is for a future pr or release where we change the randomness to use the env.np_random
gym_miniworld/envs/remotebot.py
Outdated
@@ -128,7 +131,7 @@ def _recv_frame(self): | |||
|
|||
self.img = img | |||
|
|||
def reset(self): | |||
def reset(self, seed, options): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add type hints
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I noticed that the type hint situation is not consistent, some functions have it while others don't. Is there a guideline? Or should we just add type hints to all of the functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At some point, it would be great to type hint the whole project but for now just having reset
and step
would be easiest. We can make another PR that adds type hinting for more of the project.
@pytest.mark.parametrize("env_id", gym_miniworld.envs.env_ids)
def test_env_checker(env_id):
if "RemoteBot" in env_id:
return
env = gym.make(env_id).unwrapped
warnings.simplefilter("always")
with warnings.catch_warnings(record=True) as w:
check_env(env)
for warning in w:
if warning.message.args[0] not in CHECK_ENV_IGNORE_WARNINGS:
raise gym.error.Error(f"Unexpected warning: {warning.message}")
env.close() |
Description
Changed the dependency on
gym
togymnasium
atv0.26.2
.Fixes # (issue)
A list of the changes:
step
fromobs, reward, done, info
toobs, reward, termination, truncation, info
.return_info
inreset()
and returnsobs, info
all the time.render_mode
to the environments.gymnasium
and adapt to the new output ofreset()
andstep()
.seed()
Type of change
Please delete options that are not relevant.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)