Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

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

Open
tylerlum wants to merge 1 commit into
isaac-sim:mainfrom
tylerlum:2023-04-10_HydraTabCompletion
Open

Refactor train.py and cfg to allow hydra tab completion#127
tylerlum wants to merge 1 commit into
isaac-sim:mainfrom
tylerlum:2023-04-10_HydraTabCompletion

Conversation

@tylerlum

@tylerlum tylerlum commented Apr 10, 2023

Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant