-
Notifications
You must be signed in to change notification settings - Fork 505
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
Move gym from habitat_baselines to habitat #864
Conversation
@vincentpierre Pre-commit is now working properly again. Feel free to pull form master to resolve. |
done = True | ||
return done | ||
|
||
def get_info(self, observations): | ||
return self.habitat_env.get_metrics() | ||
|
||
|
||
@baseline_registry.register_env(name="NavRLEnv") | ||
@habitat.registry.register_env(name="NavRLEnv") | ||
class NavRLEnv(habitat.RLEnv): |
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.
This impacts all tasks, including non-rearrangement tasks (like PointNav/ObjectNav) are we okay with this?
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.
How big is the impact do you think? How may users make a distinction between the baseline registry and the habitat.registry?
I am having a hard time figuring it out.
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.
This should be fine. It'll impact users that are getting envs out of the baselines registry/registering their own envs, but it's a simple enough fix and this change overall makes sense.
dataset = make_dataset( | ||
config.TASK_CONFIG.DATASET.TYPE, config=config.TASK_CONFIG.DATASET | ||
) | ||
if "TASK_CONFIG" in config: |
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.
What's the purpose of this? Shouldn't this only be through config, not the TASK_CONFIG as with habitat baselines configurations?
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.
The reason is because I want to allow the user to pass either a task config or a baseline config to make the environment. If the user passes a baseline config, this code will look at the task config and use it. Does that make sense ?
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
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.
LGTM. Thanks for the migration guide!
* merging * - * Updating configs * - * - * - * fixing tests * fixing tests * changing configs * Update habitat/tasks/rearrange/multi_task/composite_sensors.py Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com> * Update habitat/tasks/rearrange/multi_task/composite_sensors.py Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com> * addressing comments Co-authored-by: vincentpierre <vincentpierre@users.noreply.github.com> Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
* merging * - * Updating configs * - * - * - * fixing tests * fixing tests * changing configs * Update habitat/tasks/rearrange/multi_task/composite_sensors.py Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com> * Update habitat/tasks/rearrange/multi_task/composite_sensors.py Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com> * addressing comments Co-authored-by: vincentpierre <vincentpierre@users.noreply.github.com> Co-authored-by: Aaron Gokaslan <skylion.aaron@gmail.com>
Migration Guide
Changes to imports :
When importing the gym definitions, you must replace :
with
When importing the render_wrapper, you must replace :
with
If you were using
habitat_baselines.common.baseline_registry
to register a RLEnv, you must now usehabitat.registry
to do so.Changes to configuration files
The following configuration keys no longer belong to habitat_baselines configs :
Their respective replacements are now in the habitat task configs:
In addition, a new key :
needs to be added to the task config file with the same value as the current
ENV_NAME
of the corresponding habitat_baselines config (default value isRearrangeRLEnv
).Motivation and Context
In order to separate habitat from habitat_baselines, we move the gym environments to habitat. This enables users to quickly start using the habitat environments without having to install the habitat_baselines trainers.
Reward and success definitions have been moved from baseline configuration to task configuration.
Modified configs creation script to allow modification of the task config from the baseline config.
How Has This Been Tested
Tested that training starts for all of the registered gym environments tasks
Added a unit tests that runs one episode of each gym environment
properly behaves.
Types of changes
Checklist