-
Notifications
You must be signed in to change notification settings - Fork 389
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
add config check for learning rate typing #699
base: main
Are you sure you want to change the base?
Conversation
Thank you for your PR @Quetzalcohuatl Please make sure that you are using the yaml standard used in PyYAML and write scientific notation with a decimal point learning_rate: 3.0e-4 or learning_rate: 3.e-4 to be on the safe side, always write the base as a float and add a sign to the exponent (plus or minus). |
But your check can indeed make sense in order to catch a wrongfully formatted learning rate. In that case, please update the error message to reflect the correct usage. |
Yep, realized that after I made the post haha. Perhaps a config validator is an idea. There was another hyperparam (can't remember which one) where I passed 1.0 and it complained because it was a float and wanted an integer 1. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, @Quetzalcohuatl !
Could you fix the style errors please.
./llm_studio/python_configs/cfg_checks.py:107:89: E501 line too long (105 > 88 characters)
./llm_studio/python_configs/cfg_checks.py:108:66: BLK100 Black would make changes.
./llm_studio/python_configs/cfg_checks.py:108:89: E501 line too long (111 > 88 characters)
Apart from that, the checks are only applied for UI use, where it shouldn't fail anyway, as these fields are type casted.
Two ways to solve probably:
- apply these checks to CLI, too.
- force type casting of these values
@pascal-pfeiffer Imo if you have the code for type-checking for UI, might as well lift-and-shift it to the CLI use-case. That would solve the error where for one of the hyperparams I typed "1.0" as a float but it wanted an integer as "1" |
Yes, that would be great. Though, in current form, the code will never get called. |
common error is to set learning rate with e notation. For example 3e-4. Yaml parses it as a string