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

Pass multiple metrics into the optimizer #723

Merged
merged 16 commits into from
Apr 29, 2024

Conversation

motus
Copy link
Member

@motus motus commented Mar 22, 2024

We will need this for multi-objective optimization as well as for training the optimizers that can take muti-dimensional input

  • Make Storage.Experiment.load() return multiple scores
  • Fix unit tests to check for loading multi-dimensional scores from the DB
  • Make Optimizer.register() and .bulk_register() take multi-dimensional trial scores
  • Fix the Optimizer unit tests to check for registering multi-dimensional scores
  • Check the Scheduler and optimization loop unit tests to see if we need to adjust the types etc.

NOTE: In this PR, we do not change mlos_core: we will still pass a single scalar into it and do not change the API on mlos_core side. We will change mlos_core in the subsequent PR to minimize the diff.

Part of #692

@motus motus added WIP Work in progress - do not merge yet mlos-bench labels Mar 22, 2024
@motus motus self-assigned this Mar 22, 2024
@motus motus marked this pull request as ready for review March 22, 2024 23:45
@motus motus requested a review from a team as a code owner March 22, 2024 23:45
@motus motus added ready for review Ready for review and removed WIP Work in progress - do not merge yet labels Mar 23, 2024
Copy link
Contributor

@bpkroth bpkroth left a comment

Choose a reason for hiding this comment

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

Sorry for the delay. LGTM. Thanks!

@bpkroth bpkroth merged commit 58464b9 into microsoft:main Apr 29, 2024
12 checks passed
bpkroth added a commit that referenced this pull request Apr 30, 2024
* [x] Update JSON schema to use `"optimizer_target": {"score": "min"}`
format
* [x] Update base Optimizer class to use the new config format (throw
`NotImplementedError` if > 1 target)
* [x] Modify all unit tests to use the new format

Part of #692

Merge after #723

---------

Co-authored-by: Brian Kroth <bpkroth@users.noreply.github.com>
@motus motus deleted the sergiym/opt/multiobjective branch May 1, 2024 00:21
motus added a commit that referenced this pull request May 9, 2024
* [x] Store multiple optimization targets and directions in base
`Optimizer` class
* [x] Support multiple optimization targets in mock and grid search
optimizers
* [x] Check for single objective in `MlosCoreOptimizer` class (will add
support for multiple objectives after implementing that feature in
`mlos_core` in subsequent PRs)
* [x] Update unit tests in mlos_bench

Merge after ~#723~ and ~#725~

---------

Co-authored-by: Brian Kroth <bpkroth@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants