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

Add GridSearch Optimizer support #690

Merged
merged 56 commits into from
Mar 7, 2024

Conversation

bpkroth
Copy link
Contributor

@bpkroth bpkroth commented Feb 26, 2024

Closes #688

  • Introduces GridSearchOptimizer to mlos_bench
    • Generates and stores a set of tuple(dict.values()) from ConfigSpace to track elements of the config grid to search
    • If max_iterations > len(grid) can refill the grid if desired (e.g., by calling suggest() after not_converged() returns False.
    • If max_iterations < len(grid) (i.e., we don't have enough iterations to complete the grid) will issue a warning.

@bpkroth bpkroth added the WIP Work in progress - do not merge yet label Feb 26, 2024
Copy link
Member

@motus motus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments. To summarize:

  • let's have a separate PR with type-related fixes to the Tunable and related classes
  • remove .span/.values/.quantized_values from Tunable and move that logic to the optimizer
  • I am sure we can do without HashableTunableValuesDict class. I would suggest to track the tuples of tunable values in the optimizer instead of using the dict (should use less memory, too)

mlos_bench/mlos_bench/tunables/tunable.py Outdated Show resolved Hide resolved
mlos_bench/mlos_bench/tunables/tunable.py Outdated Show resolved Hide resolved
mlos_bench/mlos_bench/storage/util.py Outdated Show resolved Hide resolved
mlos_bench/mlos_bench/tunables/covariant_group.py Outdated Show resolved Hide resolved
mlos_bench/mlos_bench/optimizers/grid_search_optimizer.py Outdated Show resolved Hide resolved
@bpkroth bpkroth added the ready for review Ready for review label Mar 4, 2024
@bpkroth bpkroth removed the WIP Work in progress - do not merge yet label Mar 5, 2024
@bpkroth bpkroth marked this pull request as ready for review March 5, 2024 15:32
@bpkroth bpkroth requested a review from a team as a code owner March 5, 2024 15:32
bpkroth added a commit that referenced this pull request Mar 5, 2024
Also fix some missing conversion issues.

Split out from #690.
bpkroth added a commit that referenced this pull request Mar 6, 2024
Some type hint and alias tweaks for Tunables and a few others.

Split off from #690.
bpkroth added a commit that referenced this pull request Mar 6, 2024
Adds support for introspecting the values from a quantized or otherwise
discrete Tunable.

Split out from #690.
Copy link
Member

@motus motus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments. overall, looks good, thank you!

Copy link
Member

@motus motus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@motus motus merged commit e881987 into microsoft:main Mar 7, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mlos_bench: grid search support
2 participants