-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Populate hyperopt defaults using schema #2968
Conversation
@@ -207,7 +208,9 @@ def run_hyperopt_executor( | |||
def test_hyperopt_executor(scenario, csv_filename, tmpdir, ray_cluster_4cpu): | |||
search_alg = scenario["search_alg"] | |||
executor = scenario["executor"] | |||
run_hyperopt_executor(search_alg, executor, csv_filename, tmpdir) | |||
# When using the hb_bohb scheduler, num_epochs must equal max_t (which is 81 by default) |
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.
How did you come to discover this? Is this worth adding as an auxiliary validation?
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.
I didn't know about this either, but found out that we've added this logic here in our ModelConfig object creation logic: https://github.com/ludwig-ai/ludwig/blob/master/ludwig/schema/model_config.py#L532
This PR adds a new step to ensure that all of the defaults for search algorithm, split, executor etc. are correctly populated using the schema object before accessing them to prevent key errors. All of these parameters are required by hyperopt and expected to be present downstream for config validation, executor creation, and trial execution.
The reason we've not noticed this before in our tests is because all of our tests specify
search_alg
in the hyperopt config.Co-authored-by: Kabir Brar kabir@predibase.com
Co-authored-by: Travis Addair tgaddair@gmail.com