Skip to content

Conversation

tylerlum
Copy link

@tylerlum tylerlum commented Apr 10, 2023

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

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.

1 participant