-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support reduced-space formulation #70
Comments
I'm open to this, and at various times I had a prototype. I ended up going with simplicity in this initial version. The reduced-space is actually quite easy to implement, since we just return expressions: MathOptAI.jl/src/predictors/Affine.jl Lines 55 to 69 in 4a8f1f3
I wasn't sure whether the syntax should be: add_predictor(model, predictor, x; reduced_space::Bool) or add_predictor(model, predictor, x)
add_reduced_space_predictor(model, predictor, x) Probably the |
See #71. I'd appreciate your thoughts. |
At first thought, I'd probably go with add_predictor(model, predictor, x; formulation::FormulationEnum=FULL_SPACE) Thanks for opening #71. I'll try to give it a review tomorrow. |
I've also opened #72. I think I might like that better. |
I think this is just a user-defined operator built-in to JuMP? Or are you thinking that we would automate the derivative info, etc. |
Closed by #72 Feel free to open a new issue for the black-box thing if you wanted something other than a user-defined operator. |
Yes, I was thinking we could automate derivative info. I don't have a concrete use case for now though, but will re-open if it comes up. |
The documentation says:
I believe this is actually an open research question for nonlinear problems. I've seen full and reduced space formulations each perform better for certain applications. I propose that we have an option to implement reduced-space formulations.
Longer term, it might even be nice to have a fully "black-box" formulation, where we just return to the user an external function for evaluating the predictor (along with its derivatives, if requested). This way we could potentially evaluate the predictor using something like PyTorch or Jax, which could take advantage of existing infrastructure for AD or GPU acceleration.
The text was updated successfully, but these errors were encountered: