Skip to content

Conversation

Transurgeon
Copy link
Member

@Transurgeon Transurgeon commented Oct 15, 2025

Description

Please include a short summary of the change.
IPOPT converges to the same optimal solution as max's CCP method, but quite a bit faster.
Issue link (if applicable):

Type of change

  • New feature (backwards compatible)
  • New feature (breaking API changes)
  • Bug fix
  • Other (Documentation, CI, ...)

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.

Copy link

github-actions bot commented Oct 15, 2025

Benchmarks that have improved:

   before           after         ratio
 [4f101cc3]       [81fa7cd0]
  •     1.12±0s          932±0ms     0.83  gini_portfolio.Cajas.time_compile_problem
    

Benchmarks that have stayed the same:

   before           after         ratio
 [4f101cc3]       [81fa7cd0]
      1.38±0s          1.48±0s     1.07  matrix_stuffing.ParamConeMatrixStuffing.time_compile_problem
      566±0ms          588±0ms     1.04  simple_QP_benchmarks.ParametrizedQPBenchmark.time_compile_problem
      284±0ms          294±0ms     1.04  matrix_stuffing.ParamSmallMatrixStuffing.time_compile_problem
      524±0ms          535±0ms     1.02  semidefinite_programming.SemidefiniteProgramming.time_compile_problem
      232±0ms          237±0ms     1.02  gini_portfolio.Murray.time_compile_problem
      4.57±0s          4.64±0s     1.02  huber_regression.HuberRegression.time_compile_problem
      2.87±0s          2.91±0s     1.01  quantum_hilbert_matrix.QuantumHilbertMatrix.time_compile_problem
      2.33±0s          2.36±0s     1.01  simple_LP_benchmarks.SimpleFullyParametrizedLPBenchmark.time_compile_problem
      4.96±0s          5.03±0s     1.01  optimal_advertising.OptimalAdvertising.time_compile_problem
      242±0ms          244±0ms     1.01  high_dim_convex_plasticity.ConvexPlasticity.time_compile_problem
      11.4±0s          11.5±0s     1.01  simple_LP_benchmarks.SimpleLPBenchmark.time_compile_problem
      338±0ms          341±0ms     1.01  gini_portfolio.Yitzhaki.time_compile_problem
      1.10±0s          1.10±0s     1.00  finance.FactorCovarianceModel.time_compile_problem
      292±0ms          292±0ms     1.00  slow_pruning_1668_benchmark.SlowPruningBenchmark.time_compile_problem
      22.7±0s          22.7±0s     1.00  sdp_segfault_1132_benchmark.SDPSegfault1132Benchmark.time_compile_problem
      255±0ms          255±0ms     1.00  simple_QP_benchmarks.SimpleQPBenchmark.time_compile_problem
      1.86±0s          1.86±0s     1.00  simple_QP_benchmarks.UnconstrainedQP.time_compile_problem
      946±0ms          943±0ms     1.00  simple_LP_benchmarks.SimpleScalarParametrizedLPBenchmark.time_compile_problem
      13.0±0s          13.0±0s     1.00  finance.CVaRBenchmark.time_compile_problem
      1.70±0s          1.69±0s     0.99  tv_inpainting.TvInpainting.time_compile_problem
     44.7±0ms         44.3±0ms     0.99  matrix_stuffing.SmallMatrixStuffing.time_compile_problem
      5.19±0s          5.13±0s     0.99  svm_l1_regularization.SVMWithL1Regularization.time_compile_problem
      734±0ms          721±0ms     0.98  matrix_stuffing.ConeMatrixStuffingBench.time_compile_problem
      897±0ms          832±0ms     0.93  simple_QP_benchmarks.LeastSquares.time_compile_problem

Comment on lines +270 to +275
rows, cols, vals = grad_dict[var]
grad = sp.coo_matrix((vals, (rows, cols)), shape=(1, size))
vals = grad.T
if sp.issparse(vals):
vals = vals.toarray().flatten(order='F')
self.grad_obj[grad_offset:grad_offset+size] = vals
Copy link
Member Author

@Transurgeon Transurgeon Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we keep these changes so that we don't rely on cvxpy's grad functionality?

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 this pull request may close these issues.

1 participant