add multi objective BOHB optimizer - #141
Conversation
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Most of this just moved to kde_sampler.py, I like a side by side diff to make this easier to read.
There was a problem hiding this comment.
These also just moved from the staged/bohb_test.py
| assert max_fidelity_best == mid_fidelity_best | ||
|
|
||
|
|
||
| def test_sample_configurations(): |
There was a problem hiding this comment.
This also just moved from staged/bohb_test.py
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
There was a problem hiding this comment.
🟡 Changes recommended
Supported dependency versions, invalid-loss ranking, and KDE fallback handling can currently produce import or optimization failures.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds MO-BOHB with Pareto-front ranking and NSGA-II crowding distance, while extracting BOHB’s shared KDE and staged scheduling infrastructure.
Changes:
- Adds the MO-BOHB optimizer, dependency extra, documentation, and tests.
- Generalizes staged optimization for single and multiple objectives.
- Moves shared KDE sampling code and bumps the package to 6.0.0.
File summaries
| File | Description |
|---|---|
blackboxopt/__init__.py |
Bumps version to 6.0.0. |
blackboxopt/optimizers/bohb.py |
Adopts generalized staged scheduling. |
blackboxopt/optimizers/hyperband.py |
Adopts generalized staged scheduling. |
blackboxopt/optimizers/mobohb.py |
Adds the public MO-BOHB optimizer. |
blackboxopt/optimizers/staged/bohb.py |
Retains single-objective KDE specialization. |
blackboxopt/optimizers/staged/hyperband.py |
Generalizes iteration construction and promotion. |
blackboxopt/optimizers/staged/iteration.py |
Stores and processes objective vectors. |
blackboxopt/optimizers/staged/kde_sampler.py |
Extracts shared KDE sampling machinery. |
blackboxopt/optimizers/staged/mobohb.py |
Adds Pareto ranking and MO-KDE splitting. |
blackboxopt/optimizers/staged/optimizer.py |
Splits staged schedulers by objective type. |
blackboxopt/optimizers/staged/utils.py |
Updates scalar promotion for loss vectors. |
docs/optimizers/mobohb.md |
Documents MO-BOHB behavior. |
mkdocs.yml |
Adds MO-BOHB documentation navigation. |
pyproject.toml |
Adds the MO-BOHB extra and version bump. |
tests/optimizers/bohb_test.py |
Relocates BOHB sampling coverage. |
tests/optimizers/mobohb_test.py |
Tests public MO-BOHB behavior. |
tests/optimizers/staged/bohb_test.py |
Retains BOHB sampler-specific tests. |
tests/optimizers/staged/iteration_test.py |
Updates tests for vector losses. |
tests/optimizers/staged/kde_sampler_test.py |
Tests shared KDE utilities. |
tests/optimizers/staged/mobohb_test.py |
Tests Pareto ranking and MO sampling. |
uv.lock |
Locks version and MO-BOHB dependencies. |
Review details
- Files reviewed: 20/21 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
… fallback Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
| best_vector = convert_from_statsmodels_kde_representation( | ||
| vector, self.vartypes | ||
| ) | ||
| continue |
There was a problem hiding this comment.
That fallback was missing the convert_from_statsmodels_kde_representation which I added.
| ) | ||
| from pymoo.util.nds.efficient_non_dominated_sort import ( | ||
| efficient_non_dominated_sort, | ||
| ) |
There was a problem hiding this comment.
Seems to have moved to:
from pymoo.functions.standard.non_dominated_sorting import (
efficient_non_dominated_sort,
)
Reuses most of single objective BOHB, but replaces the single-objective based decisions with ranking configurations by nondominated (Pareto) front and breaks ties within the boundary front by crowding distance (NSGA-II style).
I moved a couple of tests around and the shared KDE sampler bit around to get a clean base for the single and multi objective variants, apologies for that - hope it doesn't make this PR that unnecessarily complex to read.
Also, I broke some of the public import paths, thus the bump of the major version.