For a large, sparse quadratic programs, is there any way to disable the DCP checking? It performs a (full) eigenvalue decomposition, which is obviously prohibitively expensive. It seems like the option "ignore_dcp" doesn't get passed through to the right place..
import cvxpy
import scipy.sparse as sprs
P = sprs.eye(100000)
x = cvxpy.Variable(100000)
prob = cvxpy.Problem(cvxpy.Minimize(cvxpy.quad_form(x, P)))
prob.solve()
Slightly unrelated... I have implemented an error detection for OSQP if you pass a nonconvex QP: https://github.com/oxfordcontrol/osqp/pull/75 It is definitely much faster than doing the SVD. It checks the residuals. @gbanjac
@moehle if you look at the code in problems.problem.py there are two things of note. First, there is a comment in ._solve() saying that ignore_dcp is deprecated / will most likely be removed. Second, it looks like ignore_dcp isn't used anywhere in the function!
As it stands, ignore_dcp should probably be completely removed from cvxpy. Right now it looks like there is some functionality, but in fact there isn't. @SteveDiamond do you agree?
That said it would not be hard to effectively disable DCP checking for QPs (and indeed it would be reasonable to have this feature since some of cvxpy's QP solvers don't convert to SOCP). I'll open that as a separate issue if Steven agrees that a full implementation for ignore_dcp should be removed.
@SteveDiamond ping -- do you agree that ignore_dcp should be completely removed from cvxpy?
Yes ignore_dcp should be removed. It actually originated with an ancient project to solve non-DCP problems.
Fixed on master.
Most helpful comment
Slightly unrelated... I have implemented an error detection for OSQP if you pass a nonconvex QP: https://github.com/oxfordcontrol/osqp/pull/75 It is definitely much faster than doing the SVD. It checks the residuals. @gbanjac