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

Clarify how to address ECOS_DEP_DEPRECATION_MSG FutureWarning added in version 1.5 #2442

Closed
cjerdonek opened this issue May 13, 2024 · 3 comments
Assignees
Labels
bug good first issue help wanted We would appreciate contributions for this issue! A CVXPY member will provide guidance.

Comments

@cjerdonek
Copy link
Contributor

cjerdonek commented May 13, 2024

Hi, I recently upgraded CVXPY to 1.5.1 and would like clarification on the ECOS_DEP_DEPRECATION_MSG FutureWarning it's now showing (added in PR #2388) and how to address it:

/.../python3.9/site-packages/cvxpy/reductions/solvers/solving_chain.py:354: FutureWarning: 
    You specified your problem should be solved by ECOS. Starting in
    CXVPY 1.6.0, ECOS will no longer be installed by default with CVXPY.
    Please either add an explicit dependency on ECOS or switch to our new
    default solver, Clarabel, by either not specifying a solver argument
    or specifying ``solver=cp.CLARABEL``.

When you say "add an explicit dependency on ECOS," do you mean stop passing solver='ECOS' to problem.solve() and use ECOS directly, or do you just mean to add the ECOS package as an explicit installation dependency to the project?

If the latter, it's not clear to me how CVXPY would detect that it's been added, so it's not clear to me how to make the warning go away if you'd like to keep passing solver='ECOS'. If the former, it sounds like ECOS won't be supported at all and not just that it won't be installed by default (though I'm guessing this isn't what you mean). Or do you mean something else entirely? Thanks!

@phschiele
Copy link
Collaborator

Hi @cjerdonek! ECOS will remain a supported solver even after the next release.
By "add an explicit dependency on ECOS" we mean that you should add ECOS to your list of dependencies (in pyproject.toml, requirements.txt, etc).

So come CVXPY 1.6 and you reinstall your project, without having CVXPY pinned. Then there are two sencarios

  1. You added ECOS as an explicit dependency, it will therefore be installed, and your call to .solve(solver=cp.ECOS) will pass
  2. You did not add ECOS explicitly, and the call will fail because ECOS isn't installed

To make the warning go away in 1.5, you can either try the Clarabel solver (we'd be curious to hear if it doesn't work well in your case), or you can filter the warning until 1.6 is released.

@cjerdonek
Copy link
Contributor Author

cjerdonek commented May 14, 2024

Thanks, @phschiele! I appreciate the prompt reply.

It might be worth clarifying in the text of your FutureWarning message that filtering the warning will also be needed to make the warning go away if one chooses the former option of adding the dependency explicitly. As it stands now, only the second of the two options will actually suppress the warning. Regarding the Clarabel solver, I'll give that a shot and let you know if I experience any problems!

@PTNobel PTNobel self-assigned this May 23, 2024
@PTNobel PTNobel added bug help wanted We would appreciate contributions for this issue! A CVXPY member will provide guidance. good first issue labels May 23, 2024
cjerdonek added a commit to cjerdonek/cvxpy that referenced this issue May 25, 2024
cjerdonek added a commit to cjerdonek/cvxpy that referenced this issue May 25, 2024
@cjerdonek
Copy link
Contributor Author

I posted PR #2454 to address this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue help wanted We would appreciate contributions for this issue! A CVXPY member will provide guidance.
Projects
None yet
Development

No branches or pull requests

3 participants