Cvxpy: DCCP no longer works

Created on 28 Jul 2020  路  5Comments  路  Source: cvxgrp/cvxpy

DCCP seems to be completely broken, but the author is not responding to bug reports. Can any cvxpyer suggests what might cause the following error, so I can have a go at fixing it myself?

kbriggs@Dell:~/Downloads/dccp-master> python3 examples/phase_retrieval.py 
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/cvxpy-1.1.0a1-py3.6-linux-x86_64.egg/cvxpy/utilities/performance_utils.py", line 33, in _lazyprop
    return getattr(self, attr_name)
AttributeError: 'AddExpression' object has no attribute '_lazy_canonical_form'

Most helpful comment

I updated dccp to fix all the different issues you found, and some others.

All 5 comments

With verbose=True, I get this, suggestion that the solve step actually worked, but something goes wrong afterwards:

kbriggs@Dell:~/Downloads/dccp-master> python3 examples/binary_equation.py 

ECOS 2.0.7 - (C) embotech GmbH, Zurich Switzerland, 2012-15. Web: www.embotech.com/ECOS

It     pcost       dcost      gap   pres   dres    k/t    mu     step   sigma     IR    |   BT
 0  +0.000e+00  -0.000e+00  +1e+02  7e-02  8e-06  1e+00  5e+01    ---    ---    1  1  - |  -  - 
 1  -4.945e-03  +8.839e-10  +1e+00  9e-04  9e-08  2e-02  6e-01  0.9890  1e-04   2  1  1 |  0  0
 2  -1.092e-04  +1.956e-11  +1e-02  1e-05  1e-09  2e-04  6e-03  0.9890  1e-04   3  1  1 |  0  0
 3  -1.808e-06  +3.243e-13  +1e-04  1e-07  1e-11  3e-06  7e-05  0.9890  1e-04   7  1  1 |  0  0
 4  -2.661e-08  +4.780e-15  +2e-06  1e-09  1e-13  4e-08  8e-07  0.9890  1e-04   1  0  0 |  0  0
 5  -3.672e-10  +6.631e-17  +2e-08  1e-11  1e-15  5e-10  9e-09  0.9890  1e-04   1  0  0 |  0  0
 6  -4.865e-12  +8.833e-19  +2e-10  1e-13  2e-17  7e-12  9e-11  0.9890  1e-04   2  0  0 |  0  0

OPTIMAL (within feastol=1.5e-13, reltol=3.8e+01, abstol=1.8e-10).
Runtime: 0.001439 seconds.

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/cvxpy-1.1.0a1-py3.6-linux-x86_64.egg/cvxpy/utilities/performance_utils.py", line 33, in _lazyprop
    return getattr(self, attr_name)
AttributeError: 'AddExpression' object has no attribute '_lazy_canonical_form'

I found that the latest version from github does not have this problem. I was using the version installed by pip, which seems to be out-of-date.

I updated dccp to fix all the different issues you found, and some others.

Steven: thanks very much for all the fixes - this has solved all my problems and is very much appreciated! I think it's very worthwhile to keep DCCP alive, as it adds a lot of extra problem types which can be solved.

Sure! Totally agree, DCCP is really nice.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wfrece picture wfrece  路  9Comments

angeris picture angeris  路  8Comments

gbanjac picture gbanjac  路  9Comments

Bonnevie picture Bonnevie  路  6Comments

rbf22 picture rbf22  路  7Comments