Add comprehensive SDP test suite and evaluation harness#23
Open
Add comprehensive SDP test suite and evaluation harness#23
Conversation
Comprehensive analysis of what's needed to move SDP cone support from experimental to production quality, covering correctness bugs, test coverage, numerical robustness, performance, KKT solver integration, MOI wrapper completeness, and documentation. https://claude.ai/code/session_01PNGZft69CuPURr3qSAt8xe
Adapt test problem generators and test suite to use Vector instead of n×1 Matrix, matching the refactor in 4f17f4a.
953da34 to
58d7952
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a complete test suite for the SDP (semidefinite programming) solver implementation, including 40+ unit tests covering core SDP operations, standard problem instances, edge cases, and an evaluation harness for systematic validation.
Key Changes
New test file
test/sdp_tests.jl(583 lines): Comprehensive test suite organized into sections:vecm/matround-trip and inner product preservationVecConguranceblock operations (multiplication, inversion, composition)xsdc!,dsdc!) and their inverse relationshipmaxstep_sdc) correctnessNew problem generator file
test/sdp_problems.jl(420 lines): Reusable SDP problem instances:sdp_psd_projection: Project matrices with mixed-sign eigenvalues onto PSD conesdp_trace_minimization: Minimize trace subject to PSD constraintsdp_max_cut_relaxation: Goemans-Williamson relaxation for random graphssdp_lovasz_theta: Lovász theta number computationsdp_nearest_correlation: Find nearest correlation matrix with unit diagonalsdp_multiple_blocks: Multiple independent SDP blockssdp_mixed_cones: Heterogeneous R+, SOC, and SDP conessdp_with_equality: SDP with equality constraintssdp_rank_one: SDP with rank-1 optimal solutionsdp_identity_feasible: Trivially feasible problemsdp_larger: Scaling test with n=10New evaluation harness
test/sdp_harness.jl(272 lines):SDPResultstruct for collecting detailed diagnostics (status, iterations, solve time, feasibility, objective error, solution error)sdp_solve(): Run single problem with validation against known solutionsrun_sdp_harness(): Batch execution across multiple problemsrun_sdp_harness_all_solvers(): Cross-solver validationprint_sdp_report(): Formatted summary table with pass/fail indicatorsIntegration into test suite: Added
include("sdp_tests.jl")totest/runtests.jlDevelopment container: Added
.devcontainer/devcontainer.jsonfor Julia 1.10 development environmentProduction plan document
SDP_PRODUCTION_PLAN.md: Detailed roadmap for moving SDP from experimental to production status, covering:nestod_sdcCholesky robustness,maxstep_sdceigenvalue handling,VecConguranceKKT solver integration)Notable Implementation Details
kktsolver_qr,kktsolver_sparse, andkktsolver_2x2_vdim()and_extract_sdp_matrix()abstract away vectorization detailsoptTol,tol) for robustness acrosshttps://claude.ai/code/session_01PNGZft69CuPURr3qSAt8xe