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
Multiprecision and Python 3.11 support for SDPA #2097
Conversation
This should be handled internally by SDPA for Python, and as of version 0.2, it takes care of it.
Benchmarks that have stayed the same:
|
This is super cool!!
…On Tue, Apr 4, 2023 at 8:14 PM Usama Muneeb ***@***.***> wrote:
Description
SDPA for Python now supports SDPA Multiprecision
<https://github.com/sdpa-python/sdpa-multiprecision>, a fork of SDPA-GMP.
This change will test the multiprecision backend and Python 3.11 wheels in
the CI pipeline.
SDPA with OpenBLAS backend does not pass LP5 test on the Windows runners,
so I changed install_dependencies.sh to use the multiprecision backend on
Windows and the regular (OpenBLAS) backend on Linux and macOS.
Type of change
- New feature (backwards compatible)
- New feature (breaking API changes)
- Bug fix
- Other (Documentation, CI, ...)
Contribution checklist
<https://www.cvxpy.org/contributing/index.html#contribution-checklist>
- Add our license to new files.
- Check that your code adheres to our coding style.
- Write unittests.
- Run the unittests and check that they’re passing.
- Run the benchmarks to make sure your change doesn’t introduce a
regression.
------------------------------
You can view, comment on, or merge this pull request online at:
#2097
Commit Summary
- b160dd8
<b160dd8>
Enable previously skipped tests
- 9fa8ed1
<9fa8ed1>
Use multiprecision backend for Windows tests
- 21d17af
<21d17af>
Remove phasevalue flipping
File Changes
(4 files <https://github.com/cvxpy/cvxpy/pull/2097/files>)
- *M* continuous_integration/install_dependencies.sh
<https://github.com/cvxpy/cvxpy/pull/2097/files#diff-602fe9fc60aa156fa83df8056884a0707e6fd9edc8fe497cc61aedd077a24146>
(13)
- *M* cvxpy/reductions/solvers/conic_solvers/sdpa_conif.py
<https://github.com/cvxpy/cvxpy/pull/2097/files#diff-edf428e85c14b14f102c1eed684b9b7ea198a0526f70fc3c29fa7c786d025d04>
(31)
- *M* cvxpy/tests/test_conic_solvers.py
<https://github.com/cvxpy/cvxpy/pull/2097/files#diff-896acfa00647f17dac200b1cbe34230a583fd253a22286bff4481f600c6140c8>
(3)
- *M* cvxpy/tests/test_problem.py
<https://github.com/cvxpy/cvxpy/pull/2097/files#diff-86d3f6ee4d1742fbbfb77be8a87aba79ea3462342fa658f792b28512a0140953>
(2)
Patch Links:
- https://github.com/cvxpy/cvxpy/pull/2097.patch
- https://github.com/cvxpy/cvxpy/pull/2097.diff
—
Reply to this email directly, view it on GitHub
<#2097>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACRLIFDHVBCMSGR6BLQSNL3W7S2OZANCNFSM6AAAAAAWTMCNSQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@usamamuneeb tests are failing because of unrelated issues with COPT. Can you please update our web documentation to mention these changes? You'll want to update the solver install guide and the material about choosing solver settings. It would be nice to add a dedicated test that showcases the accuracy guarantees of SDPA-multiprecision. You can have a test under One possibility is to have a basic LP/SDP where some variable has optimal value sqrt(2). Using double-precision arithmetic, an IPM should only be able to compute a solution to accuracy 1e-8 or so. With multiprecision support, you can ask for a solution accurate to 1e-16. I don't think you can ask for a solution with accuracy better than 1e-16 since CVXPY will probably convert to double-precision somewhere in its rewriting process. (It would be good to check if that happens and to document it if so.) |
Hi @rileyjmurray, I will go over the SDPA-GMP paper to select some problems which show the benefit of using the multiprecision variant. If I recall correctly, besides a more accurate solution, multiprecision version also has a secondary benefit in sense that it can solve some ill posed problems in SDPLIB that the regular SDPA package cannot. As test cases, I will try to select some problems to demonstrate each of these benefits. |
Hi @usamamuneeb. Thanks for adding the new test problem! I think we should wrap I suggest you add an enumeration like SDPA_Variants with values |
Hi @rileyjmurray, just made the change. LP7 will now run only if GMP support is available. In the next release of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved! @phschiele @SteveDiamond can one of you review? It's a little ambiguous as to whether this is changing the public API, but regardless it would be good to get more eyes on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@usamamuneeb Great feature, thanks a lot. LGTM
Description
SDPA for Python now supports SDPA Multiprecision, a fork of SDPA-GMP. This change will test the multiprecision backend and Python 3.11 wheels in the CI pipeline.
SDPA with OpenBLAS backend does not pass LP5 test on the Windows runners, so I changed
install_dependencies.sh
to use the multiprecision backend on Windows and the regular (OpenBLAS) backend on Linux and macOS.Type of change
Contribution checklist