diffcp
diffcp copied to clipboard
Differentiation through cone programs
this cone is supported by both scs and clarabel the projection is defined here: https://github.com/cvxgrp/scs/blob/master/src/cones.c#L629 derivative, someone would have to sit down and derive, i guess.
It would be great to add support for [Clarabel solver](https://github.com/oxfordcontrol/Clarabel.rs). Since it is already supported in cvxpy, and it takes very similar inputs as SCS, I believe it should not...
SCS 3.0 changed the status strings casing: https://github.com/cvxpy/cvxpy/pull/1499#issuecomment-950406804
This should be easier after we migrate to Github actions (#43). See https://github.com/cvxpy/cvxpy/pull/1378 for an example.
Smaller PR of just this from #39. Will send in the refinement PR on top of this once it's merged I've replaced `pi` with the C++ version, but the tests...
On Ubuntu 20.04, if -fopenmp is passed when compiling but not when linking, importing diffcp results in the following error ``` >>> import diffcp Traceback (most recent call last): File...
`diffcp` is installed with openmp flags: ` MARCH_NATIVE=1 OPENMP_FLAG="-fopenmp" pip install diffcp ` It's at least 5 times slower than `np.linalg.solve`. Eigen solve should not be much slower than np.linalg.solve....
I've been following the paper "Differentiating Through a Cone Program" and the code side-by-side, and I'm having trouble figuring out if there is a sign error in the adjoint derivative...
It should be pretty easy to update `solve_and_differentiate` to not pre-compute anything for the derivative if the user doesn't need this. Otherwise if somebody wants to use this for the...
The example in the readme uses `diffcp.utils.random_cone_prog` which is actually defined here: https://github.com/cvxgrp/diffcp/blob/cbea99715974e36050232d20ff22c38bb92ea91f/examples/utils.py Perhaps the easiest solution here is to move this inside of `diffcp.utils` and then add the `utils`...