Feature/batch size dependent book keeping gp bo#140
Draft
14e6 wants to merge 2 commits into
Draft
Conversation
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
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 |
||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the BoTorch-based Bayesian optimization implementation so that when max_pending_evaluations=None (no limit), the optimizer no longer tracks pending evaluation specifications / IDs, avoiding unbounded pending-spec bookkeeping.
Changes:
- Disable assigning/storing
evaluation_idand pending-spec tracking whenmax_pending_evaluationsisNone. - Add targeted tests covering “no bookkeeping” behavior and reporting of custom evaluations under
max_pending_evaluations=None. - Bump project version to
5.4.0and update packaging/lock metadata (including addingurllib3>=2.7.0to theallextra).
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
blackboxopt/optimizers/botorch_base.py |
Makes pending-spec bookkeeping conditional on max_pending_evaluations being set. |
tests/optimizers/botorch_base_test.py |
Adds tests ensuring behavior is correct when pending bookkeeping is disabled/enabled. |
pyproject.toml |
Bumps version; adds urllib3>=2.7.0 to the all optional extra. |
blackboxopt/__init__.py |
Bumps __version__ to 5.4.0. |
uv.lock |
Updates locked metadata for the version bump and dependency set (incl. urllib3). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
302
to
+306
| else: | ||
| eval_spec = self._generate_evaluation_specification() | ||
| eval_spec.optimizer_info["model_based_pick"] = True | ||
|
|
||
| eval_id = self.X.size(-2) + len(self.pending_specifications) | ||
| eval_spec.optimizer_info["evaluation_id"] = eval_id | ||
| self.pending_specifications[eval_id] = eval_spec | ||
| if self.max_pending_evaluations is not None: |
Comment on lines
36
to
41
| "torch>=2.3", | ||
| "botorch>=0.7.1", | ||
| "pymoo>=0.5,<1.0", | ||
| "scikit-learn", | ||
| "urllib3>=2.7.0", | ||
| ] |
14e6
marked this pull request as draft
June 8, 2026 11:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Deactivate book-keeping of evaluation specifications for GP based Bayesian Optimization when no limit on pending specifications specified.