h2o-llmstudio
h2o-llmstudio copied to clipboard
add config check for learning rate typing
common error is to set learning rate with e notation. For example 3e-4. Yaml parses it as a string
Thank you for your PR @Quetzalcohuatl
After careful checks, I can assure you that the current implementation is working as intended and scientific notation is of course supported in .yaml
configs.
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.
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.
@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. The integration to CLI needs to be added
closing this for now, please re-open accordingly