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

[Feature request] Add a required parameter utility to throw an error if parameter not provided #27

Open
miguelvr opened this issue Aug 5, 2019 · 0 comments · May be fixed by #28
Open

Comments

@miguelvr
Copy link

miguelvr commented Aug 5, 2019

This suggestion is very broad but the idea would be to be able to assign an YACS leaf object to deal with required parameters. This concept could be extended to other functionalities like help strings, range checkers, type checkers, etc...

Example:

from yacs.params import required

_C = CfgNode()
_C.LEARNING_RATE = required(type=float)

Let me know if you think it is a good idea and I can start working on a PR.

@miguelvr miguelvr linked a pull request Aug 6, 2019 that will close this issue
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 a pull request may close this issue.

1 participant