Skip to content

Request sufficient accuracy in three gradient checks - #243

Draft
SteveDiamond wants to merge 1 commit into
cvxpy:masterfrom
SteveDiamond:codex/fix-gradient-test-accuracy
Draft

Request sufficient accuracy in three gradient checks#243
SteveDiamond wants to merge 1 commit into
cvxpy:masterfrom
SteveDiamond:codex/fix-gradient-test-accuracy

Conversation

@SteveDiamond

Copy link
Copy Markdown
Collaborator

Description

Three finite-difference gradient checks fail with SCS 3.3.1 at default solve accuracy: inequality duals, vector-equality duals, and the SDP example. Their finite-difference step is smaller than the solver error, so perturbations can produce a numerical Jacobian that disagrees with the analytical derivative.

Request eps=1e-10 at those three call sites, following the existing gradient tests that already specify this tolerance. The gradient assertions and finite-difference settings are unchanged. This is six added lines and three removed lines across two test files; there are no dependency caps or production-code changes.

Found while investigating CVXPY CI in cvxpy/cvxpy#3513. CVXPY's extension workflow clones this repository, so its remaining three failures need this upstream change.

Validation

  • Reproduced all three failures locally with SCS 3.3.1 before the change; all three pass afterward.
  • pytest tests/test_dual_variables.py tests/test_torch.py: 50 passed, 28 skipped (optional backends), against CVXPY master plus Fix SCS 3.3 compatibility and CI accuracy assumptions cvxpy#3513.
  • Ruff passes on both changed files.
  • Kept as a draft for upstream CI and review.

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