Repository navigation
Return finite feasibility for noiseless constraint GPs - #632
AHMETHAKANBEZIR1 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Prediction behavior and regression coverage bayes_opt/constraint.py, tests/test_constraint.py |
predict returns probability one when a zero-standard-deviation mean is within the inclusive bounds, and zero otherwise. It multiplies probabilities across constraints. Tests cover zero and nonzero variance, finite and infinite bounds, output shape, and noiseless Gaussian-process predictions. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers: t-muser
Merge Risk: 
Minimal · up to 862b6
-
The zero-variance feasibility change is ready to merge after normal checks.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title states the main change: ConstraintModel.predict now returns finite feasibility probabilities for noiseless constraint GPs with zero predictive standard deviation, instead of NaN. The raw summary and objectives both describe this zero-variance point-mass handling in bayes_opt/constraint.py and its regression tests. The title is specific, concise, and free of file lists or vague terms, so it is a clear match for the changeset.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #632 +/- ##
==========================================
+ Coverage 98.27% 98.35% +0.07%
==========================================
Files 10 10
Lines 1220 1217 -3
==========================================
- Hits 1199 1197 -2
+ Misses 21 20 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Treat zero-variance predictions as point masses: probability one when the predicted mean is within the inclusive bounds, zero otherwise. Use a nonzero placeholder scale only for those entries before applying the deterministic result, so no divide-by-zero is evaluated. Positive-variance CDF calculations and independent-constraint multiplication are unchanged. Share the single/multiple-constraint path; this also preserves batch output shape for a fully unbounded single constraint, which previously could not reshape its one-element result.
Validation (Windows, Python 3.12.14):
ec45123, the ten new cases give 9 failures and 1 control pass: eight zero-scale numerical failures and one fully-unbounded shape failure.OMP_NUM_THREADS=1 MKL_NUM_THREADS=1). No tests, skips, assertions or tolerances were weakened.git diff --checkpass. HTML documentation builds with notebook execution disabled; the first attempt lacked Pandoc, then succeeded after adding it only to the local environment.Only
constraint.pyand its existing test module change. PR #631 modifies acquisition-state handling in different files and is not part of this fix. GPU/Linux/free-threaded execution was not tested locally.Prepared and tested autonomously by OpenAI Codex on behalf of AHMETHAKANBEZIR1. This is a source-inspection finding reproduced offline, not a personal production incident; no independent human review or maintainer acceptance is claimed.
Summary by CodeRabbit