Skip to content
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

unit test TestQp::test_all_solvers fails after updating to scipy 1.12 #2341

Closed
ghost opened this issue Feb 4, 2024 · 0 comments · Fixed by #2343
Closed

unit test TestQp::test_all_solvers fails after updating to scipy 1.12 #2341

ghost opened this issue Feb 4, 2024 · 0 comments · Fixed by #2343

Comments

@ghost
Copy link

ghost commented Feb 4, 2024

Describe the bug
after updating from scipy 1.11.4 -> 1.12 the following unit tests started failing: -- root cause seems the same as described in osqp/osqp-python#121 (comment) (scipy.sparse.random values transposed)

=================================== FAILURES ===================================
___________________________ TestQp.test_all_solvers ____________________________

self = <cvxpy.tests.test_qp_solvers.TestQp testMethod=test_all_solvers>

    def test_all_solvers(self) -> None:
        for solver in self.solvers:
            self.quad_over_lin(solver)
            self.power(solver)
            self.power_matrix(solver)
            self.square_affine(solver)
            self.quad_form(solver)
            self.affine_problem(solver)
            self.maximize_problem(solver)
            self.abs(solver)
    
            # Do we need the following functionality?
            # self.norm_2(solver)
            # self.mat_norm_2(solver)
    
            self.quad_form_coeff(solver)
            self.quad_form_bound(solver)
            self.regression_1(solver)
            self.regression_2(solver)
            self.rep_quad_form(solver)
    
            # slow tests:
            self.control(solver)
            self.sparse_system(solver)
            self.smooth_ridge(solver)
            self.huber_small(solver)
>           self.huber(solver)

cvxpy/tests/test_qp_solvers.py:105: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cvxpy/tests/test_qp_solvers.py:370: in huber
    self.assertAlmostEqual(1.327429461061672, objective.value, places=3)
cvxpy/tests/base_test.py:39: in assertAlmostEqual
    super(BaseTest, self).assertAlmostEqual(a, b, places=places, delta=delta)
E   AssertionError: 1.327429461061672 != 0.8462713317138182 within 3 places (0.48115812934785374 difference)
----------------------------- Captured stdout call -----------------------------
The problem is QP:  True
(3, 100) (3,)

Version

  • OS: linux
  • CVXPY Version: 1.4.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants