Skip to content

Feature/batch size dependent book keeping gp bo#140

Draft
14e6 wants to merge 2 commits into
mainfrom
feature/batch-size-dependent-book-keeping-gp-bo
Draft

Feature/batch size dependent book keeping gp bo#140
14e6 wants to merge 2 commits into
mainfrom
feature/batch-size-dependent-book-keeping-gp-bo

Conversation

@14e6

@14e6 14e6 commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Deactivate book-keeping of evaluation specifications for GP based Bayesian Optimization when no limit on pending specifications specified.

14e6 added 2 commits June 8, 2026 11:47
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
Signed-off-by: Grossberger Lukas (CR/AIR3) <Lukas.Grossberger@de.bosch.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  blackboxopt
  __init__.py
  blackboxopt/optimizers
  botorch_base.py
Project Total  

This report was generated by python-coverage-comment-action

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_id and pending-spec tracking when max_pending_evaluations is None.
  • Add targeted tests covering “no bookkeeping” behavior and reporting of custom evaluations under max_pending_evaluations=None.
  • Bump project version to 5.4.0 and update packaging/lock metadata (including adding urllib3>=2.7.0 to the all extra).

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 thread pyproject.toml
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
14e6 marked this pull request as draft June 8, 2026 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants