isaac-sim / IsaacGymEnvs

Isaac Gym Reinforcement Learning Environments
Other
1.79k stars 392 forks source link

Refactor train.py and cfg to allow hydra tab completion #127

Open tylerlum opened 1 year ago

tylerlum commented 1 year ago

Goal

Add Hydra tab completion for train.py to help users write commands more quickly, rather than needing to constantly check the config yaml files to remember the parameter names (eg. I kept forgetting if it was num_envs or numEnvs)

hydra_tab_completion

^ Example gif showing what the tab completion looks like

How To Use

To set up, run:

eval "$(python train.py -sc install=bash)"

Then simply type python train.py and then the tab completion will work. You can start typing a parameter name (eg. python train.py num_) and press tab to either autocomplete or show possible completions.

Low-Level Details About Changes

Relevant Screenshots from Hydra Documentation

image ^ currently using version_base 1.1, so set this explicitly

image ^ using version 1.1, so put _self_ last

image ^ add explicit override term