Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dchassin
Copy link

Description

  1. Allow Problem.get_problem_data() to use solver=None as the default call.
  2. Update Problem.get_problem_data() docs to make clear that cache invalidation even when providing the name of the default solver chosen by the previous solve.

Issue link (if applicable): #2842

Type of change

  • Bug fix
  • Other (Documentation, CI, ...)

Contribution checklist

  • Check that your code adheres to our coding style.
  • Write unittests.
    • Added test_get_problem_data() to test_problem.py.
  • Run the unittests and check that they’re passing.
    • No change is existing test suite (2 tests failed before on missing hypothesis module)
  • Run the benchmarks to make sure your change doesn’t introduce a regression.
    • The file cvxpy/tests/test_benchmarks.py does not exist.

dchassin added 2 commits June 26, 2025 12:01
* Allow default None for solver

* Update get_problem_data() docs
@CLAassistant
Copy link

CLAassistant commented Jun 26, 2025

CLA assistant check
All committers have signed the CLA.

@dchassin dchassin changed the title Allow default None for solver (#1) Allow default None for solver in Problem.get_problem_data() without invalidating problem cache Jun 26, 2025
@dchassin dchassin changed the title Allow default None for solver in Problem.get_problem_data() without invalidating problem cache Allow default None for solver in Problem.get_problem_data() Jun 26, 2025
@github-actions
Copy link

Benchmarks that have stayed the same:

   before           after         ratio
 [a6bdefb9]       [ff790c78]
      844±0ms          867±0ms     1.03  simple_QP_benchmarks.LeastSquares.time_compile_problem
      13.2±0s          13.3±0s     1.01  finance.CVaRBenchmark.time_compile_problem
      5.18±0s          5.21±0s     1.01  svm_l1_regularization.SVMWithL1Regularization.time_compile_problem
      295±0ms          297±0ms     1.01  slow_pruning_1668_benchmark.SlowPruningBenchmark.time_compile_problem
      935±0ms          940±0ms     1.01  simple_LP_benchmarks.SimpleScalarParametrizedLPBenchmark.time_compile_problem
      1.88±0s          1.89±0s     1.01  simple_QP_benchmarks.UnconstrainedQP.time_compile_problem
      251±0ms          252±0ms     1.01  simple_QP_benchmarks.SimpleQPBenchmark.time_compile_problem
      1.09±0s          1.09±0s     1.00  finance.FactorCovarianceModel.time_compile_problem
      244±0ms          244±0ms     1.00  high_dim_convex_plasticity.ConvexPlasticity.time_compile_problem
      4.98±0s          4.94±0s     0.99  optimal_advertising.OptimalAdvertising.time_compile_problem
      339±0ms          336±0ms     0.99  gini_portfolio.Yitzhaki.time_compile_problem
     44.0±0ms         43.6±0ms     0.99  matrix_stuffing.SmallMatrixStuffing.time_compile_problem
      1.65±0s          1.63±0s     0.99  tv_inpainting.TvInpainting.time_compile_problem
      4.66±0s          4.60±0s     0.99  huber_regression.HuberRegression.time_compile_problem
      1.04±0s          1.03±0s     0.99  gini_portfolio.Cajas.time_compile_problem
      5.37±0s          5.28±0s     0.98  semidefinite_programming.SemidefiniteProgramming.time_compile_problem
      723±0ms          710±0ms     0.98  matrix_stuffing.ConeMatrixStuffingBench.time_compile_problem
      237±0ms          232±0ms     0.98  gini_portfolio.Murray.time_compile_problem
      293±0ms          286±0ms     0.98  matrix_stuffing.ParamSmallMatrixStuffing.time_compile_problem
      23.1±0s          22.6±0s     0.98  sdp_segfault_1132_benchmark.SDPSegfault1132Benchmark.time_compile_problem
      11.7±0s          11.4±0s     0.97  simple_LP_benchmarks.SimpleLPBenchmark.time_compile_problem
      2.41±0s          2.34±0s     0.97  simple_LP_benchmarks.SimpleFullyParametrizedLPBenchmark.time_compile_problem
      587±0ms          568±0ms     0.97  simple_QP_benchmarks.ParametrizedQPBenchmark.time_compile_problem
      1.47±0s          1.38±0s     0.94  matrix_stuffing.ParamConeMatrixStuffing.time_compile_problem
      3.01±0s          2.82±0s     0.94  quantum_hilbert_matrix.QuantumHilbertMatrix.time_compile_problem

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.

2 participants