-
Notifications
You must be signed in to change notification settings - Fork 27
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
Universal constraint sampler #328
Universal constraint sampler #328
Conversation
Hi @Osburg, Thanks for the PR, I will have a look over the Christmas days. Sorry for the delay. 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.
Looks overall good to me, just one question: is it on purpose that you inherit from the SamplerStrategy
, because then you also inherit from their the handling of NChooseKs, which is totally fine for me, but I just wanted to ask ;)
Co-authored-by: Johannes P. Dürholt <johannespeter.duerholt@evonik.com>
Thanks for pointing this out :) This was not my intention, I did not pay attention apparently. So I guess I should let |
Yep, I would then recommend to inherit from |
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 @Osburg,
thanks for the update, only some minor issues remain. We could also implement the pending_candidates
at a later point in time. But this should not be too complicated. We can do it as you want.
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.
Looks good to me! Thank you very much!
This PR adds a new sampler that supports nonlinear/linear equality/inequality constraints and NChooseKConstraints as discussed in #314. This only works for continuous inputs. In principle also batch constraints (and all other constraints you can compute a jacobian for) are supported, but since the returned sample is sampled from a larger set of candidates, the batch structure is no longer respected. By adapting the sampling logic in this last step this method can be made available for batch constraints. Closes #314.