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

Support kwargs in gym.make and export register #1301

Merged
merged 3 commits into from
Jan 29, 2019
Merged

Support kwargs in gym.make and export register #1301

merged 3 commits into from
Jan 29, 2019

Conversation

gdb
Copy link
Collaborator

@gdb gdb commented Jan 29, 2019

We avoided adding kwargs for a long time in order to encourage people to statically register their environment definitions. However, over time we've found a few important use-cases for kwargs, such as:

  • Runtime-specific objects, such as which GPU to run the environment on
  • Parametrized environments, which can have an infinite number of meaningful variants

The latter breaks the invariant that the environment ID alone determines the semantics of the environment, but it's an advanced use-case and such users should be able to manage this on their own.

This PR also exports the register method so people can register their own environments more easily.

gdb added 2 commits January 29, 2019 10:39
We avoided adding kwargs for a long time in order to encourage people
to statically register their environment definitions. However, over
time we've found a few important use-cases for kwargs, such as:

- Runtime-specific objects, such as which GPU to run the environment
  on
- Parametrized environments, which can have an infinite number of meaningful
  variants

The latter breaks the invariant that the environment ID alone
determines the semantics of the environment, but it's an advanced
use-case and such users should be able to manage this on their own.
@gdb gdb requested review from joschu and pzhokhov January 29, 2019 18:41
@gdb gdb merged commit 812c46c into master Jan 29, 2019
kiku-jw pushed a commit to kiku-jw/gym that referenced this pull request Feb 23, 2019
* Support kwargs in gym.make

We avoided adding kwargs for a long time in order to encourage people
to statically register their environment definitions. However, over
time we've found a few important use-cases for kwargs, such as:

- Runtime-specific objects, such as which GPU to run the environment
  on
- Parametrized environments, which can have an infinite number of meaningful
  variants

The latter breaks the invariant that the environment ID alone
determines the semantics of the environment, but it's an advanced
use-case and such users should be able to manage this on their own.

* Export the register method so it's easier for external users to register environments

* Improve kwargs test
zlig pushed a commit to zlig/gym that referenced this pull request Apr 24, 2020
* Support kwargs in gym.make

We avoided adding kwargs for a long time in order to encourage people
to statically register their environment definitions. However, over
time we've found a few important use-cases for kwargs, such as:

- Runtime-specific objects, such as which GPU to run the environment
  on
- Parametrized environments, which can have an infinite number of meaningful
  variants

The latter breaks the invariant that the environment ID alone
determines the semantics of the environment, but it's an advanced
use-case and such users should be able to manage this on their own.

* Export the register method so it's easier for external users to register environments

* Improve kwargs test
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.

3 participants