-
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
Feature/add desirability function in range #504
Conversation
We have a linting error pointing out that I would like to restructure the definition of the torch callables (preferrably put them into the data-models?), but that would be a bit much for this PR. @jduerholt: Can we somehow increase the level of allowed complexity for the linting? |
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. The complexity threshold can be adjusted here. As quick fix you can increase it to 19 (
Line 121 in ac38bcc
max-complexity = 18 |
We should refactor this part in a seperate PR, but I would not include it directly in the data models because than we would have torch also as part of the minimal installation, so you would need torch for running the data models.
Just increase the thresshold and merge it in. Thanks!
I increased the complexity as suggested. Thanks @jduerholt :) |
This PR adds the desirability function
InRangeDesirability
This objective is$1.$ inside a specified range, and $0.$ outside this range, defined by the
bounds
of the objective data-model.This is used in our app by the users to handle quality constraints.
The data-model is added in
bofire/data_models/objectives/desirabilities.py
An example is given within the desirability notebook
tutorials/advanced_examples/desirability_objectives.ipynb