-
Notifications
You must be signed in to change notification settings - Fork 59
Improve Surrogate-Conti Limitations #667
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
Conversation
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.
Pull Request Overview
This PR improves the handling of surrogate model limitations when working with continuous parameters by replacing a blanket restriction with proper error handling and user feedback. The changes address issue #658 by allowing surrogate models to attempt gradient computation and gracefully failing with informative error messages when they cannot support continuous spaces.
Key changes:
- Replaces upfront surrogate compatibility checks with runtime error handling
- Adds comprehensive test coverage for surrogate-continuous parameter incompatibilities
- Updates documentation to reflect the improved error handling approach
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/test_surrogate.py | Adds parametrized test to verify proper error handling for incompatible surrogate-continuous parameter combinations |
| docs/userguide/constraints.md | Removes outdated warning about silent constraint ignoring |
| baybe/surrogates/base.py | Removes blanket restriction preventing non-GP surrogates from being used with continuous spaces |
| baybe/recommenders/pure/bayesian/base.py | Adds try-catch logic to detect gradient computation failures and raise informative error messages |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
39d9906 to
f098802
Compare
AVHopp
left a comment
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.
LGTM
e7ae91e to
29e2cc1
Compare
Instead of a static name check we are now catching the expected autograd related exception
29e2cc1 to
227a26d
Compare
Implements #658