Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancements for command line arguments #2

Open
greaber opened this issue Nov 27, 2019 · 1 comment
Open

enhancements for command line arguments #2

greaber opened this issue Nov 27, 2019 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@greaber
Copy link

greaber commented Nov 27, 2019

This is an issue to discuss possible enhancements around cli overrides. Curious to hear thoughts as I have some ideas, but I haven't reflected on them a long time, and I'm not sure if they are good.

The syntax for command line arguments is verbose:

file.py --torch.optim.adam.Adam.__init__ 'HParams(lr=0.1,betas=(0.999,0.99))'

Just thinking off the top of my head here, but maybe it could be instead something like

file.py ,Adam[lr=0.1,betas=[0.999,0.99]]

Ideas here: , indicates args to be parsed by HParams; Adam just needs to match a unique substring; __init__ is the default method; no need to explicitly write HParams; brackets instead of parens to lessen the need for quotation.

Of course, for the most commonly used cli args, maybe it is already relatively straightforward to explicitly set up shortcuts so that you could write something like

file.py --lr .1 --beta1 .999 --beta2 .99

Possibly some small utility function in the libary could make setting up short custom args like these even easier.

Also, something that I don't know too much about but could be interesting to investigate is automating bash tab completion.

@PetrochukM PetrochukM added enhancement New feature or request help wanted Extra attention is needed labels Nov 27, 2019
@PetrochukM
Copy link
Owner

PetrochukM commented Nov 27, 2019

Thanks for the suggestion!

I do agree that the command line can be a bit verbose. There is an opprotunity to make it a bit less verbose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants