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

Added EzPickle to the environments #76

Merged
merged 4 commits into from Nov 22, 2022

Conversation

BolunDai0216
Copy link
Collaborator

@BolunDai0216 BolunDai0216 commented Nov 20, 2022

Description

All of the environments now also inherit from gymnasium.utils.EzPickle. Included a test for pickling.

Type of change

New feature (non-breaking change which adds functionality)

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@pseudo-rnd-thoughts pseudo-rnd-thoughts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, could you add a test that for each environment, you try to pickle and unpickle the object.
This is an example from Gymnasium. https://github.com/Farama-Foundation/Gymnasium/blob/33e32178ffdf040a095bd2c856f6410bc7ec1306/tests/envs/test_envs.py#L197

An interesting addition, in comparison to the gymnasium is to pass a keyword to check that works

@BolunDai0216
Copy link
Collaborator Author

Looks good, could you add a test that for each environment, you try to pickle and unpickle the object. This is an example from Gymnasium. https://github.com/Farama-Foundation/Gymnasium/blob/33e32178ffdf040a095bd2c856f6410bc7ec1306/tests/envs/test_envs.py#L197

An interesting addition, in comparison to the gymnasium is to pass a keyword to check that works

I added the test and passed a keyword using gym.make(env_id, max_episode_steps=100).unwrapped, is that what you had in mind?

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit f2db899 into Farama-Foundation:master Nov 22, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants