nnsmith icon indicating copy to clipboard operation
nnsmith copied to clipboard

[Dev] `hydra` -> `click`

Open ganler opened this issue 1 year ago • 0 comments

I am getting a bit upset after using hydra for a long time. I gradually realized that it actually has more cons than its pros...

Here are the main concerns in my mind that make it hard to use for both active developers and new users:

  • the argument specifying style of hydra is not compatible with that of other more popular CLI tools such as argparse -- while click allows us to make things argparse-like
  • no built-in completion: writing things in a=b style just cannot let you do auto path completion...
  • extended traceback... will extend the error stack substantially... making it harder to locate the real error.
  • inactive -- there has been a number of valuable feature requests for hydra but it is somehow unimplemented for years...
  • cannot add --help information for non-hydra arguments

Of course hydra has its own edge:

  1. Keep a record of what you typed -- however I never used that... as I am just inclined to check history
  2. Composible(?) -- well it is actually not that composable as I only find it usable by pumping things into a single main.yaml file -- this is also main reason why I found click attractive

Proposing click:

  1. Really composable as we can separate required commands and inject that into different applications
  2. Everything in Python... We don't need another .yaml which requires lots of extra configurations in package building
  3. Actively maintained -- can see the commit history
  4. It allows a lot more command-line features such as prompting.

Also cc'ing active contributors for any comments: @Co1lin @Kristoff-starling

I am planning to take this into the v0.2.0 release when we fully merged NeuRI into our main repo.

ganler avatar May 07 '23 20:05 ganler