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

Make sure One Shot Optimizer always returns the same suggestion #759

Merged
merged 20 commits into from
Jul 3, 2024
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
405b1b8
enforce OneShot optimizer to always return the same initial config
motus Jun 26, 2024
c1906e5
minor fix in the docstring
motus Jun 26, 2024
c8f67be
better naming for mock env parameters + fixes to unit tests
motus Jun 27, 2024
3e62896
use noisy mock env for optimziations
motus Jun 27, 2024
5f0f86d
Merge branch 'main' into sergiym/opt/one_shot
motus Jun 28, 2024
58aa2b1
better values for mock env seed
motus Jun 28, 2024
f45f96a
Merge branch 'main' of https://github.com/microsoft/MLOS into sergiym…
motus Jun 28, 2024
4863b65
Merge branch 'sergiym/opt/one_shot' of https://github.com/motus/MLOS …
motus Jun 28, 2024
46ee026
better unit tests for tunables intialization
motus Jun 28, 2024
32f7998
Merge branch 'main' into sergiym/opt/one_shot
motus Jun 28, 2024
f5ab2b0
roll back all changes not related to OneShotOptimizer
motus Jun 28, 2024
ab0e0e9
Merge branch 'main' of https://github.com/microsoft/MLOS into sergiym…
motus Jun 28, 2024
6c60566
Merge branch 'sergiym/opt/one_shot' of https://github.com/motus/MLOS …
motus Jun 28, 2024
4055971
Merge branch 'main' into sergiym/opt/one_shot
motus Jun 28, 2024
53a3165
Merge branch 'main' into sergiym/opt/one_shot
motus Jul 2, 2024
5f4d2b4
Merge branch 'main' of https://github.com/microsoft/MLOS into sergiym…
motus Jul 2, 2024
daee8c3
Merge branch 'sergiym/opt/one_shot' of https://github.com/motus/MLOS …
motus Jul 2, 2024
830aa46
Merge branch 'main' into sergiym/opt/one_shot
bpkroth Jul 2, 2024
6fcfe33
Merge branch 'main' into sergiym/opt/one_shot
bpkroth Jul 2, 2024
ee9eca5
Merge branch 'main' into sergiym/opt/one_shot
bpkroth Jul 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion mlos_bench/mlos_bench/optimizers/one_shot_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class OneShotOptimizer(MockOptimizer):
"""
Mock optimizer that proposes a single configuration and returns.
No-op optimizer that proposes a single configuration and returns.
Explicit configs (partial or full) are possible using configuration files.
"""

Expand All @@ -33,6 +33,14 @@ def __init__(self,
_LOG.info("Run a single iteration for: %s", self._tunables)
self._max_iter = 1 # Always run for just one iteration.

def suggest(self) -> TunableGroups:
"""
Always produce the same (initial) suggestion.
"""
tunables = super().suggest()
self._start_with_defaults = True
bpkroth marked this conversation as resolved.
Show resolved Hide resolved
return tunables

@property
def supports_preload(self) -> bool:
return False
Loading