Skip to content

Conversation

@Transurgeon
Copy link
Member

Description

Please include a short summary of the change.
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.

SteveDiamond and others added 8 commits December 26, 2025 10:20
* first attempt

* axis = None failing

* axis = None passes

* added ND grad tests

* simplification

* remove special case code

* added future warning for cumsum(scalar) behavior

* remove graph_implementaiton

* clarify 0D warning

* fix dqcp test raising future warning

* create lower triangular sparse matrix directly, rathern than through dense to sparse
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <[email protected]>
* minimal step towards axis arg for sum_squares

* more proper canonicalization

* more full featured implementation

* vectorized SOC constraints

* inherit from AxisAtom

* address claude's comments

* Remove redundant sum_squares_axis test

Removed redundant test for sum of squares as it is covered by another test.

* Clean up comments in quad_over_lin.py

Removed unnecessary comments about inherited methods.
* attempting a more systematic validation of _grad
  Add expression-level gradcheck utility and fix gradient bugs

  Implement a PyTorch-style gradcheck for systematically validating
  expression-level gradients (expr.grad[var]) against numerical finite
  differences.

  New test infrastructure (test_expression_gradcheck.py):
  - expression_gradcheck() using central finite differences
  - expression_gradcheck_multi() for multi-variable atoms
  - AtomInputGenerator for domain-aware input generation
  - Parametrized tests covering ~50 atoms with multiple random seeds
  - 185 passing tests, 64 skipped (atoms without gradient support)

  Bug fixes discovered by gradcheck:

  1. cumsum._grad (cumsum.py):
     - Was returning standard Jacobian (lower triangular) instead of
       CVXPY convention grad[i,j] = d(out[j])/d(in[i]) (upper triangular)
     - Fixed axis=None case with correct F-order permutation handling

  2. quad_over_lin._grad (quad_over_lin.py):
     - Used np.reshape() without order='F', returning C-order instead
       of CVXPY's F-order vectorization convention
     - Fixed scalar handling when y is a 1-element array

  Updated test_grad.py to use corrected gradient conventions.

  Known issues (skipped in tests):
  - pnorm_inf/norm_inf: Gradient not implemented
  - matmul/multiply: Bugs in binary_operators.py for bilinear gradients

* fixed matmul and mul elemwise grads

* validated more atoms

* pass at consolidation

* fixed domains

* added more ND checks

* consolidating test_grad

* consolidate grad further

* address claude's comments

* remove tril

* Inline test ID helper functions per review feedback

Remove get_atom_config_ids(), get_multi_var_config_ids(), and
get_domain_violation_ids() functions and inline their list
comprehensions directly at the call sites.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
…ling (#3044)

* Add ignore_nan option to solver and validation tests for NaN/Inf handling

* Moved to ParamConeProg and made some performance enhancements.

* Update doc/source/tutorial/solvers/index.rst

Co-authored-by: Copilot <[email protected]>

* Update cvxpy/problems/problem.py

Co-authored-by: Copilot <[email protected]>

* stripped down nan checking

* clarify where inf is allowed

* moved nan check

* clarifying comment

* more efficient nan check

* better test

---------

Co-authored-by: Matthew Glover <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Steven Diamond <[email protected]>
* add CSR option

* Changes what order argument does

---------

Co-authored-by: Parth Nobel <[email protected]>
* document current sum of list behaviour

* support generator input

* use GeneratorType to make generator support cleaner

---------

Co-authored-by: Muhammad Yasirroni <[email protected]>
@Transurgeon Transurgeon merged commit 5382605 into cvxgrp:master Jan 7, 2026
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.

4 participants