-
-
Notifications
You must be signed in to change notification settings - Fork 240
MO-SMAC merge #1222
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
base: development
Are you sure you want to change the base?
MO-SMAC merge #1222
Conversation
This is a safety measure. Normally, everytime we update the runhistory, the objective bounds are updated so that the value to normalize should be inside the bound.
Created a helper method to create a set with preserved order from a list
Previously: random scalarization of MO costs bc ParEGO was the only MO algo. Now: separate function which can be overwritten.
Also, reset obtain to the kwargs (no magic numbers) Better debug message
Updates incumbents of runhistory automatically if updated
# Conflicts: # smac/acquisition/maximizer/local_search.py
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.
Extra note: After merge add additional functions such as separate surrogate models and runhistories (log) for the different objectives.
| objectives="accuracy", | ||
| # min_budget=1, # Train the MLP using a hyperparameter configuration for at least 5 epochs | ||
| # max_budget=25, # Train the MLP using a hyperparameter configuration for at most 25 epochs | ||
| n_workers=4, |
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.
Works
| configs_acq.sort(reverse=True, key=lambda x: x[0]) | ||
| for a, inc in configs_acq: | ||
| inc.origin = "Acquisition Function Maximizer: Local Search" | ||
| inc.origin = "Local Search" |
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.
Fixed this already to make the pytests work again
| def _create_sort_keys(self, costs: np.array) -> list[list[float]]: | ||
| """Non-Dominated Sorting of Costs | ||
|
|
||
| In case of the predictive model returning the prediction for more than one objective per configuration |
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.
Update text to comply with workings of function
|
|
||
| return init_points | ||
|
|
||
| def _create_sort_keys(self, costs: np.array) -> list[list[float]]: |
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.
This is to get points to perform the local search with based on earlier runs. So it can make a difference. This code was not implemented by me btw. Only moved probably
| How many incumbents to keep track of in the case of multi-objective. | ||
| """ | ||
| return Intensifier( | ||
| class NewIntensifier(intermediate_decision.NewCostDominatesOldCost, |
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.
Combine with abstraction of the intensifier
| config_hash = get_config_hash(config) | ||
|
|
||
| # Do not compare very early in the process | ||
| if len(config_isb_keys) < 4: |
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.
Empirically. But the mixing is likely to overwrite this function anyway
| isb_keys = self.get_incumbent_instance_seed_budget_keys(compare=True) | ||
|
|
||
| n_samples = 1000 | ||
| if len(isb_keys) < 7: # When there are only a limited number of trials available we run all combinations |
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 believe 7 is the miminum number you need to have a least 1000 distinct samples.
# Conflicts: # README.md # smac/acquisition/maximizer/local_search.py # smac/facade/abstract_facade.py # smac/intensifier/abstract_intensifier.py # smac/main/config_selector.py # smac/runner/dask_runner.py
Multi-objective SMAC as described in https://doi.org/10.1162/evco_a_00371