nnsmith
nnsmith copied to clipboard
[Dev] `hydra` -> `click`
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
-- whileclick
allows us to make thingsargparse
-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:
- Keep a record of what you typed -- however I never used that... as I am just inclined to check
history
- 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 foundclick
attractive
Proposing click
:
- Really composable as we can separate required commands and inject that into different applications
- Everything in Python... We don't need another
.yaml
which requires lots of extra configurations in package building - Actively maintained -- can see the commit history
- 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.