This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Types of changes
Motivation and Context / Related issue
Motivation: Enable importing
mbrl-lib
in project requiring newer hydra-core>=1.1.2 version.Context:
mbrl-lib
hydra-core
version was freezed at v1.0.3 which was release in 2020. A lot of useful functionality were introduce since then.Regression warning/bug that where fixed:
Post hydra-core version 1.1 introduce breaking changes that were fixed in this PR the following way:
hydra-core>=1.1.0
setinstantiate
fct to recursive by default, breaking all mbrl-lib use ofhydra.instantiate
original behaviour with nested dict config (hydra 1.1.0 release note). Changing config files on the user side would be error-prone, so I simply added_recursive_=False
to everyhydra.utils.instantiate(<cfg>)
that deal with nested instantiation logic;_self_
keyword inexamples/conf/main.yaml
defaults
(Ref https://hydra.cc/docs/1.1/upgrades/1.0_to_1.1/default_composition_order/);@package _group_
to all config group yaml file (ref https://hydra.cc/docs/1.1/upgrades/1.0_to_1.1/changes_to_package_header/).Remark on breaking change:
++
eg:python -m mbrl.examples.main algorithm=mbpo ++device=cpu
Note:
hydra-core>=1.1.2
. Older than that wont be compatible with the proposed changes.How Has This Been Tested (if it applies)
tests/core
andtests/algorithms
mbrl/examples/README.md
.github/workflows/ci.yml
Checklist