-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Is your feature request related to a problem? Please describe.
Based on issue #1332 it would be useful to save already compiled DPP problems to reload later. The idea is to make it possible to perform a long compilation of a problem ahead of time to shorten future load times by a large margin. If possible this should be generic with respect to the solver while still overcoming the majority of the compile time.
Describe the solution you'd like
A dump, dumps, (implies compilation if it hasn't happened already) load, and loads methods on the cvxpy.Problem class.
A compile method on the cvxpy.Problem object to force compilation without solving first.
dump(str | Path, *args from cvxpy.Problem.solve as needed) - dumps compiled problem to str | Path
dumps(str | Path, *args from cvxpy.Problem.solve as needed) - returns str rep of compiled problem.
load and loads - inverse of dump, dumps
compile(*args from cvxpy.Problem.solve as needed) - forces compile of the problem without solving.
Additional context
Dumped problems would retain info on which solver they are for if needed, gp, gpc, and any other settings that would need to be baked into the compiled result.
Not sure what the best approach is for loading a problem for a specific solver and then calling solve with a different solver specified. What is done with DPP problems when solve it called twice with different parameters? Raise an exception?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status