VlachosGroup / nextorch

Experimental design and Bayesian optimization library in Python/PyTorch
https://nextorch.readthedocs.io/en/latest/
MIT License
48 stars 11 forks source link

Does NEXTorch support inequality constraints? #7

Open sgbaird opened 2 years ago

sgbaird commented 2 years ago

Nice work on NEXTorch! Seems like a compelling idea, and some difficulty with implementing human-in-the-loop optimization via Ax is what led me here.

Something very important for my use-case is inequality constraints for composition-based Bayesian optimization (also prevalence-based, fractional-based, etc., i.e. everything needs to sum to 1). For example:

A + B + C <= 1

where A, B, and C are parameters to be optimized.

For me, there would technically also be D, the final parameter is determined automatically outside of the optimization loop via:

D = 1 - sum([A, B, C])

In other words, safe to ignore D, but relevant for the context of a composition-based optimization.

Is it possible to specify an inequality constraint within the current implementation of NEXTorch?

Leon924 commented 2 years ago

same question as @sgbaird raised. I need to set some constraints on parameters to regulate the parameter space. Any idea to solve this issue?