-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Adds Hydra configuration preset overriding features. #3785
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,6 +43,19 @@ def __post_init__(self): | |
| self.commands.ee_pose.body_name = "panda_hand" | ||
| self.commands.ee_pose.ranges.pitch = (math.pi, math.pi) | ||
|
|
||
| variants = { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have this only in the test case and not main codebase? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I can do that for sure, though it will be nice to have a more visible place(maybe in future) to show how to use group override. instead of being super explicit in task ID |
||
| "actions.arm_action": { | ||
| "joint_position_to_limit": mdp.JointPositionToLimitsActionCfg( | ||
| asset_name="robot", joint_names=["panda_joint.*"] | ||
| ), | ||
| "relative_joint_position": mdp.RelativeJointPositionActionCfg( | ||
| asset_name="robot", joint_names=["panda_joint.*"], scale=0.2 | ||
| ), | ||
| } | ||
| } | ||
|
|
||
| self.variants.update(variants) | ||
|
|
||
|
|
||
| @configclass | ||
| class FrankaReachEnvCfg_PLAY(FrankaReachEnvCfg): | ||
|
|
||
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.
So this doesn't work if variants are inside the inner configs?
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.
yes, it currently only binds variants to env and agent, and all inner config are specified through dotted path. I actually thought about maybe introduce a more generalized variant class so you can bind not only in top level env or agent, but can do it at any inner level. But It feels like will be quite invasive, at need to think about it a lot more carefully. If something nice come out, I think providing both dotted path, or inner cfg variant can be pretty nice.