Unable to retrieve attribute 'BarIterCount'
I am using cvxpy with solver GUROBI. I see the error code: Unable to retrieve attribute 'BarIterCount'.
I think my code is correct because it runs if I change solver to cvxpy.OSQP
Is there any idea that why do I see the error code?
-
Can you please post the Gurobi log (add \( \texttt{verbose=True} \) as an argument to Problem.solve()) and a minimal working code example that reproduces the error?
0 -
Has there been a solution to this? I'm getting the same error when the problem size becomes moderately large. The same code works fine for small problems.
1 -
No, I talked to others but we failed to find a solution. We simply changed another solver to fix it.
0 -
What version of CVXPY are you using? I suspect this is a known CVXPY issue that was recently resolved.
0 -
I'm using version 1.1.7. Has it been resolved in the later versions?
0 -
Yes; if it's the same issue, it was fixed in CVXPY v1.1.11.
0 -
Thanks! How do I update it to 1.1.11?
0 -
I updated it to 1.1.12, but it still fails. I'll switch back to MOSEK for this problem, I guess.
-1 -
Just to be sure your Python environment is using the correct CVXPY version, can you try printing the value of \( \texttt{cvxpy.__version__}\) in your code? I only see one place in the CVXPY codebase where CVXPY queries the BarIterCount attribute, and it is written to handle an AttributeError.
It would also be helpful to see the full error message you encounter.
0 -
BarIterCount is no longer the problem. It just says GUROBI can't solve it, and recommends to use another solver.
"cvxpy.error.SolverError: Solver 'GUROBI' failed.
MOSEK appears to be working fine for the larger problems. GUROBI was much faster than MOSEK in the smaller problems, so it would have been convenient if it could be used.
0
Please sign in to leave a comment.
Comments
10 comments