-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adding Desirability functions as objectives #497
Conversation
LukasHebing
commented
Jan 10, 2025
- added a file with data-models 3 different Desirability functions: Increasing, Decreasing, and Peak Desirability
- Some options for the function design (bounds, clipping, concave/convex form
- Added torch executables into torch_tools.py
- Tests for data-models and objectives added
- A demonstration notebook, on how the functions look is added as example
There are some Linting errors. I don Error: Cannot access member "peak_position" for type "MinimizeSigmoidObjective" |
entmoot on python 3.9 is still responsible for the failing tests (see #493) |
@jduerholt: I really don`t know, how to fix the linting errors of the data-models. Field definitions of the other objectives are unchanged, still pyright wants to validate fields from other objectives, e.g.: Error: Cannot access member "lower_bound" for type "CloseToTargetObjective" |
Hi @LukasHebing, I had a day off yesterday, I will have a look today. Best, Johannes |
|
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.
@LukasHebing: Thanks!
I did a first pass with some general remarks. Regarding the linting: Maybe it stems from the not provided type argument for the new objectives?
The failing test is due to changes in the main branch: [Edit] |
@jduerholt: _________ test_ask_single_objective[SoboStrategy-spec3-False-False-2] __________ cls = <class 'bofire.data_models.strategies.predictives.sobo.SoboStrategy'>
E pydantic_core._pydantic_core.ValidationError: 7 validation errors for SoboStrategy |
This is kind of a Heisenbug, I have to take some time and tidy up these tests, it some kind of legacy back from everest and is very messy. Just ignore them for now. |
It has been fixed on main, I assume it is vanished due to this ;) |
Works now, only the linting error remains. |
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.
Hi Lukas,
looks good to me. Only some smaller comments regarding inheritance and testing.
Best,
Johannes
- desirability base class inherits from _SeriesNumpyCallable - deleted pyright_output.txt
@jduerholt : If we ignore the linting (don`t know how to fix that), I fixed everything. Let me know, if we can merge |
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.
Looks good to me. Thanks!