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

feat: expose state and key as attributes in DMEnvWrapper #27

Open
3 tasks
clement-bonnet opened this issue Sep 22, 2022 · 0 comments
Open
3 tasks

feat: expose state and key as attributes in DMEnvWrapper #27

clement-bonnet opened this issue Sep 22, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@clement-bonnet
Copy link
Collaborator

Is your feature request related to a problem? Please describe

When working with a dm_env.Environment version of a Jumanji environment using the JumanjiToDMEnvWrapper, one may need to get/set the state and key of the environment e.g. to allow planning and "restart" the environment to its previous state.

Describe the solution you'd like

Right now, this is possible by calling wrapped_env._state and wrapped_env._state which should not be allowed since key and state are private attributes.
A solution would be to properly expose them as properties and to implement setters for these properties (in the common style).


Checklist:

  • Expose state and key of JumanjiToDMEnvWrapper as properties
  • Implement setters for these properties
  • Test that one can instantiate a Jumanji environment (e.g. jumanji.make("Snake-6x6-v0")), wrap it with JumanjiToDMEnvWrapper and then get and set the corresponding state and key attributes without leading underscores
@clement-bonnet clement-bonnet added enhancement New feature or request good first issue Good for newcomers labels Sep 22, 2022
@cemlyn007 cemlyn007 changed the title feat: expose state and key as properties in DMEnvWrapper feat: expose state and key as attributes in DMEnvWrapper Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant