Skip to content

Fix test (3.10, CLARABEL): relax numpy/scipy pins incompatible with Python 3.10 - #5

Draft
mghasemi with Copilot wants to merge 55 commits into
masterfrom
copilot/fix-github-actions-job-test-3-10-clarabel
Draft

mghasemi with Copilot wants to merge 55 commits into
masterfrom
copilot/fix-github-actions-job-test-3-10-clarabel

Conversation

Copilot AI commented Aug 10, 2026

Copy link
Copy Markdown

numpy==2.4.3 and scipy==1.17.1 were pinned in requirements.txt but numpy 2.3+ requires Python ≥3.11, causing an immediate pip failure on the Python 3.10 matrix leg before any tests could run.

Changes

  • requirements.txt

    • numpy==2.4.3numpy>=1.26.0,<2.3 — upper-bounds to the last series supporting Python 3.10; pip resolves to 2.2.x on 3.10, 2.2.x on 3.11/3.12 as well
    • scipy==1.17.1scipy>=1.11.0 — unpins to avoid the same class of issue
  • .github/workflows/ci.yml

    • Added top-level permissions: contents: read — restricts GITHUB_TOKEN to the minimum necessary (also resolves two CodeQL alerts)

mghasemi and others added 30 commits March 15, 2026 00:07
- Implemented a new research memory tool for storing and managing research ideas and web findings using SQLite.
- Created SiYuan skill for searching and ingesting notes from a running SiYuan instance.
- Developed Vikunja skill for managing projects and tasks with a Vikunja server, including functionalities for listing, searching, creating, and updating projects and tasks.
- Added documentation for both SiYuan and Vikunja skills detailing usage and commands.
- Introduced a comprehensive study on the cone generated by positive semidefinite mean polynomials.
- Included definitions, theorems, and proofs related to PSD forms, SONC polynomials, and their relationships.
- Discussed various cases and properties of mean polynomials, including applications to polynomial optimization.
- Added extensive references and author information.
…earch plan

- Introduced `means02.tex`, detailing the cone generated by positive semidefinite mean polynomials, including definitions, theorems, and proofs.
- Created `plan.md` outlining a structured 3-month research program to consolidate findings and validate conjectures using computational methods.
…orem ledger for tracking polynomial optimization results and conjectures.
…ite Mean Polynomials"

- Introduced the structure of the paper including abstract, introduction, and sections on mean polynomials, nonnegative circuit polynomials, and their relationships with established cones in real algebraic geometry.
- Included theorems and propositions regarding the properties of mean polynomials, Diagonal-minus-Tail forms, and Sums of Squares.
- Discussed specific examples such as the Choi-Lam and Robinson forms, establishing their representations as mean polynomials.
- Reserved sections for future work on Positivestellensatz and applications to polynomial optimization.
…finitions, fix annotations, and resolve notation issues
…RL and enhance Phase 3 experiment matrix with detailed hypotheses and logging schema.
…tation

- Updated research orchestrator to include Wolfram|Alpha for computational queries.
- Enhanced academic writing refiner to verify mathematical claims using Wolfram|Alpha.
- Added new prompts for Wolfram|Alpha proof and query functionalities.
- Created a new Wolfram|Alpha skill with structured commands for querying and verification.
- Implemented a CLI tool for Wolfram|Alpha interactions, supporting short answers and structured verification.
- Developed unit tests for Wolfram|Alpha skill, covering client configuration, response normalization, and live integration tests.
- Implement `phase3_benchmarks.py` to run mean-polynomial experiments with SDP/SOS and SONC/GP checks, logging results in JSONL format.
- Create `phase3_build_classification_table.py` to aggregate results from benchmark runs into a classification table in CSV and Markdown formats.
- Develop `phase3_build_manuscript_tables.py` to generate LaTeX tables for manuscript use from the classification CSV.
- Introduce `phase3_pilot_report.py` to summarize benchmark results into a compact Markdown report.
- Add `phase3_sonc_diagnostics.py` to run targeted diagnostics on failed SONCRelaxations cases, testing various configurations.
- Increased total records for SDPRelaxations in phase3_pilot_summary_clean_d6_lc1_batch3.md from 2 to 5.
- Updated timeout counts for SDPRelaxations in phase3_pilot_summary_clean_d6_lc1_batch3.md.
- Added new JSONL records for phase3_runs_clean_d6_lc1_batch3.jsonl with additional timeout cases.
- Introduced command-line argument --case-offset in phase3_benchmarks.py to skip generated cases.
- Created new summary files for various batches (4, 5, 6, 7, 8) with updated records and failure concentrations.
- Added new JSONL files for boundary and mixed cases in phase3_runs_clean_cx1 and phase3_runs_clean_d6_lc1.
- Included results for phase3_runs_clean_cx1_d3_n5_probe.jsonl with a successful case.
…m probe script

- Created `phase3_sonc_diagnostics_d6_structural.md` to summarize SONC diagnostics results.
- Introduced `adr-config.yml` for configuring security policies regarding package imports, HTTP domains, and filesystem paths for agents.
- Implemented `adr-wrapper.sh` to enforce security policies on agent commands, logging violations and creating tasks for review.
- Developed `phase3_cx2_transform_probe.py` to run stress probes on CX-2 transforms, generating JSONL and markdown summaries of results.
- Summarized outcomes from the second escalation pass, confirming computational intractability under standard solvers.
- Added detailed records for timeout results across uniform, boundary, and mixed templates.
- Updated theorem ledger to reflect the deferred status of d=6, n=5 L-C1.
- Synchronized manuscript with new findings and updated computational results.

Co-authored-by: Copilot <copilot@github.com>
… theorem ledger; add Makefile for PDF generation

Co-authored-by: Copilot <copilot@github.com>
- Introduced `op3_local_neighborhood_table.csv` to store results of local neighborhood experiments.
- Created `phase3_backfill_support_class.py` for backfilling support_class in historical JSONL logs.
- Developed `phase3_cx2_local_neighborhood.py` to run OP3 Robinson-hat local neighborhood sweep, including diagnostics and summary generation.

Co-authored-by: Copilot <copilot@github.com>
…d updates

- Updated L-C1 and L-C2 conjectures in theorem ledger with detailed computational evidence and next actions.
- Added new results for d=6 L-C2 clean-pilot refresh, including success and failure diagnostics.
- Introduced new files for OP3 wide coefficient scan results, summarizing outcomes and providing detailed tables and JSON logs.
- Created cross-comparison analysis between SONC and SOS methods for d=6, highlighting structural claims and implications.
- Compiled SONC diagnostics summary for d=6 L-C2 cases, detailing case counts and diagnostic configurations.

Co-authored-by: Copilot <copilot@github.com>
- Created immediate_execution_tracker_2026-04-27.md to document the execution of five sessions, including tasks, gate decisions, and notes for each session.
- Added op1_backend_readiness_note_2026-04-27.md detailing the backend readiness for OP1, including environment checks and locked pilot manifest.
- Introduced op3_boundary_characterization_note_2026-04-28.md to summarize the mathematical boundary characterization for OP3, including candidate criteria and gate evaluation.
- Added results for OP3 boundary characterization, including micro-grid verification summary and detailed results in JSONL and CSV formats.
- Documented session 2 E1 pilot summary in phase3_pilot_summary_d6_lc1_e1_pilot_2026-04-27.md, outlining the execution results and gate evaluation.
- Created phase3_runs_clean_d6_lc1_e1_pilot_2026-04-27.jsonl to store the results of the E1 pilot execution, capturing solver attempts and outcomes.

Co-authored-by: Copilot <copilot@github.com>
- Updated plan.md to reflect advancements in OP2 theorem-stage kickoff and next steps.
- Enhanced theorem_ledger.md with detailed updates on L-C2 conjecture and geometry-first criteria.
- Added op2_delta_support_summary.json and op2_delta_support_table.csv to summarize Delta_support metrics across various slices.
- Implemented phase3_op2_delta_support.py script to compute Delta_support and classify cases based on geometry-first criteria.
- Improved documentation and output formats for clarity and usability in ongoing research efforts.

Co-authored-by: Copilot <copilot@github.com>
…with project cycle status and conjecture clarification

Co-authored-by: Copilot <copilot@github.com>
- Added `sosonc.py` module for SOS+SONC two-step optimization framework.
- Created documentation for SOS+SONC relaxations in `doc/sosonc.rst`.
- Developed example script `examples/SOSONCSchickSeparating.py` demonstrating Schick's separating polynomial.
- Implemented test suite in `tests/test_sosonc.py` covering various polynomial cases and integration tests.
- Defined `SOSONCRelaxations` class with methods for SOS, SONC, and two-step relaxations.
- Introduced result container `SOSONCRelaxSol` to encapsulate optimization results.
- Added implementation plan in `plan_sosonc.md` detailing class structure and methods.
…upport, increment version to 1.3, and adjust sosonc.rst example notation
…e unused yinyang.png, and revise revision history for version 1.2.6
Mehdi Ghasemi and others added 21 commits July 12, 2026 16:44
…fix power_ratio type, purge dead stub, rewrite tests
Replace power_ratio formulation with lcm(q,p) in _build_mean_certificate_moments():
- cert = (sum w_i X_i^q)^{c/q} - (sum w_i X_i^p)^{c/p} where c = lcm(q,p)
- Both c/q and c/p are guaranteed integers, eliminating float exponent KeyError
- Special case: p=0 (geometric mean) uses c=q, q_exp=1, p_term=1
- Add import math.lcm for Python 3.9+ compatibility

Test updates:
- Tighten Choi-Lam tolerance from 1e-2 to 1e-4 (exact construction improves precision)
- Add Robinson form test (R_hat) at order=2 with realistic SDP bounds
- All 7 tests pass
- Add depth parameter to DSDPRelaxations.__init__ (default=1, backward compat)
- Extract _build_mean_pair(q, p) -> (Q, P) for single mean form construction
- Extract _expand_certificate(cert) -> moment constraints list
- Add _build_depth_product() for 2^d alternating-sign expansion:
  * depth d generates d mean pairs (q+k, p+k) for k=0..d-1
  * Product expansion: (Q1-P1)(Q2-P2)... = sum_{s in {0,1}^d} (-1)^|s| prod term_k
  * d=2 yields 4 terms: Q1Q2 + P1P2 - Q1P2 - P1Q2
- Update solve() report to include depth info
- Add TestDepthExpansion class with 5 new tests:
  * depth default=1, Choi-Lam depth=2, (x-y)^2 depth=2
  * constraint count growth, mean pair correctness
- All 12 tests pass (7 Phase 2 + 5 Phase 3), 5.21s
…ts() — differentiate before reduce, auto-register derivation on __init__
…ts, agent configs, benchmark scripts, and external skill tests
- Added _newton_support() to extract exponent vectors from polynomials
- Added _pruned_exponents() for Minkowski sum-based basis reduction
- Wired pruning into ReducedMonomialBase via self.NewtonPruning flag
- Verified 86.7% basis reduction on sparse Motzkin-like problems
- Pruned basis is provably a subset of full basis (correctness preserved)
…_polytope, relaxation_api), benchmark gallery, tests, plan consolidation

New modules (Phase 3):
- Irene/border_basis.py (523 lines): BorderBasis class for quotient ring K[x]/I
- Irene/sparsity.py (282 lines): UnionFind + CorrelativeSparsity detection
- Irene/newton_polytope.py (328 lines): Newton polytope monomial pruning
- Irene/relaxation_api.py (443 lines): Unified RelaxationEngine dispatch

Tests: 51+ Phase 3 tests (border_basis 10, sparsity 16, newton 13, api 12)
Benchmarks: gallery.yaml (12 problems) + run_gallery.py runner
Docs: plan_master.md deduplicated, execution_log.md updated, SiYuan pushed
Vikunja: P3.8 integration task (#479), P4.2 marked done, all task descriptions detailed
… gallery --quick, separating examples regression guard
- Multi-stage Dockerfile (base system deps + per-version final image)
- docker-compose.yml with Python 3.10, 3.11, 3.12 parallel services
- .dockerignore to exclude venv, reports, IDE artifacts from build context
- requirements.txt updated: gpkit for SONC, pytest-cov for coverage reporting
- Coverage XML output persisted via named volume mount
- Healthcheck validates all solver backends import correctly
- Verified: 107/110 tests pass on Python 3.11 (2 xfail/skip + 1 pre-existing SDPA failure)
…fix 6 CI failures

Speed fixes (gap: +15% → +4.6%):
- symbolic_engine.py: to_sympy() short-circuits sp.Basic (86% fewer conversions)
- relaxations.py: _poly() bypasses engine.Poly() overhead (21 call sites);
  AuxSyms + from_problem gens as SymPy symbols (eliminate per-call conversion)
- sdp.py: CVXOPT/DSDP skip CVXPY → native CvxOpt() (restores SOS infeasibility)
- relaxation_api.py: infeasibility check before primal_val guard

CI fixes (6 jobs pass, 116/116 tests):
- tests/test_solver_routing.py: accept CVXOPT native routing; wire ci_solver fixture
- tests/test_relaxations.py: ball_constraint uses CLARABEL explicitly
- conftest.py: ci_solver fixture reads IRENE_CI_SOLVER env var

Benchmark infrastructure:
- benchmarks/compare_irene_vs_rewrite.py: cross-version comparison runner
- benchmarks/profile_symengine_overhead.py: micro-benchmarks (SymEngine vs SymPy)
- benchmarks/instrument_relaxation_v2.py: call-count traced relaxation

Plan + reports:
- plan_master.md: Phase 5 added (9 optimization tasks), execution log updated
- Reports/IreneRewrite_Comparison_20260808.md: full comparison report
- tests/conftest.py: ci_solver fixture wired to IRENE_CI_SOLVER env var
- docker-compose.yml: 6 services (py3.10/3.11/3.12 x CLARABEL/SCS)
- Dockerfile.ci: multi-arg build with system deps and solver validation
- ci_entrypoint.sh: dispatch script for test/benchmark/shell modes
- pyproject.toml: modern packaging with pytest config and optional extras
- .github/workflows/ci.yml: refined matrix, timeout, benchmark job + artifact upload

Verified: 122 tests pass, Docker Compose validates, gallery quick-mode <1s
…ion, NonPOPSDP port

Symbolic backend selection (user-selectable SymEngine/SymPy):
- symbolic_engine.py: set_backend()/get_backend(), IRENE_SYMBOLIC_BACKEND
  env var (symengine|sympy|auto), graceful fallback when symengine absent
- symengine moved to optional [symengine] extra in pyproject.toml
- 23 tests: Irene/tests/test_symbolic_engine.py

Feature parity with original Irene:
- DSDPRelaxations.build_ade_relations() restored (multi-derivation wrt=)
- Irene/__init__.py re-exports DSDP classes
- nonpopsdp.py ported (Taylor/Chebyshev -> POP -> SDP) with fixed
  approximation numerics (original Chebyshev maxerr ~61.5, Taylor ~1e36)

Quotient-basis option (Groebner vs BorderBasis reduction engine):
- RelaxationConfig.quotient_basis = 'groebner' (default) | 'border'
- IRENE_QUOTIENT_BASIS env var; wired through ReduceExp/ReducedMonomialBase
- BorderBasis QR pivot tie-break fix (ascending-lex weight perturbation)
- 11 tests: tests/test_quotient_basis.py

Benchmarks: benchmark_backends.py gains quotient_basis section; report
generator updated (backend_comparison_report.md). Docs: nonpopsdp.rst (new),
relaxation_api.rst, border_basis.rst, algebra.rst, examples.rst, README.

Full suite: 169 tests pass under both SymEngine and SymPy backends.
…CGIK/Archimedean grounding, formal term ordering, migration guide, notation index, doctest integration
…raw 2699545 in sdp.rst; fix eq→\neq in optim.rst
Copilot AI and others added 3 commits August 10, 2026 14:32
…ot/fix-github-actions-job-test-3-10-clarabel

Co-authored-by: mghasemi <3860408+mghasemi@users.noreply.github.com>
numpy==2.4.3 is only available for Python >=3.11 (numpy 2.3+ dropped Python 3.10 support).
Replace with numpy>=1.26.0,<2.3 which covers Python 3.10, 3.11, and 3.12.

Similarly relax scipy==1.17.1 to scipy>=1.11.0 to avoid potential
version-availability issues across Python versions.

Co-authored-by: mghasemi <3860408+mghasemi@users.noreply.github.com>
Co-authored-by: mghasemi <3860408+mghasemi@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job test (3.10, CLARABEL) Fix test (3.10, CLARABEL): relax numpy/scipy pins incompatible with Python 3.10 Aug 10, 2026
Copilot AI requested a review from mghasemi August 10, 2026 14:38
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