Irene
Irene is a Python toolkit for constrained polynomial optimization over commutative real algebras.
It supports multiple relaxation families and backends:
SOS and moment-SDP relaxations
SONC relaxations
hybrid SOS+SONC workflows
legacy and CVXPY-based SDP solver paths
Repository Status (2026-08-09)
Development status: active
Versioning: stable 1.x line — current version defined in pyproject.toml (see CHANGELOG.md)
Phases 1-3 modernization work: completed
Current focus: integration hardening, CI/benchmark automation, and remaining reduction wiring
Implemented modernization highlights in this repository:
Selectable symbolic backend via IRENE_SYMBOLIC_BACKEND (SymEngine primary, SymPy fallback)
CVXPY solver abstraction layer (with Clarabel/SCS/CVXOPT integration)
Structural reduction modules:
border basis
correlative sparsity detection
Newton polytope pruning
Unified relaxation entrypoint in Irene/relaxation_api.py
Runtime telemetry helpers in Irene/telemetry.py
Known current gap:
Phase 3 reduction modules are implemented and tested, but full end-to-end integration through all legacy relaxations.py code paths is still in progress.
Reduction defaults:
Structural reductions are opt-in for compatibility. Pass RelaxationConfig to RelaxationEngine to enable Newton-polytope pruning, border-basis reduction, or correlative sparsity detection.
Requirements
Core runtime (from pyproject.toml):
Python >= 3.10
sympy, numpy, scipy
cvxpy, cvxopt
gpkit, multiprocess
Optional extras:
.[symengine] for SymEngine acceleration
.[solvers] for additional conic/QP solvers (clarabel, scs, osqp)
.[dev] for testing and coverage tooling
Symbolic backend selection:
IRENE_SYMBOLIC_BACKEND=symengine (default when available)
IRENE_SYMBOLIC_BACKEND=sympy
IRENE_SYMBOLIC_BACKEND=auto
Installation
From PyPI:
pip install irene
or from source (development):
pip install .[symengine,solvers]
Development dependencies:
pip install .[dev,symengine,solvers]
Testing
Run test suites configured in pyproject.toml:
pytest
The project includes tests under Irene/tests/ and tests/.
Quick Start (Modern API)
from Irene.grouprings import CommutativeSemigroup, SemigroupAlgebra
from Irene.program import OptimizationProblem
from Irene.relaxation_api import RelaxationEngine
sg = CommutativeSemigroup(["x", "y", "z"])
sga = SemigroupAlgebra(sg)
x, y, z = sga["x"], sga["y"], sga["z"]
prog = OptimizationProblem(sga)
prog.set_objective(-2*x + y - z)
prog.add_constraint(x + y + z <= 4)
prog.add_constraint(x >= 0)
engine = RelaxationEngine(prog, order=2, solver="cvxpy")
result = engine.solve("sos")
print(result.status, result.value)
Legacy API Compatibility
The legacy API remains available for backward compatibility (for example SDPRelaxations). For new code, prefer OptimizationProblem + RelaxationEngine.
Documentation
Read the hosted documentation at irene.readthedocs.io. Documentation sources are in doc/ and include architecture, migration, solver, and benchmark chapters.
Build docs locally:
make -C doc html
License
Irene is distributed under the MIT License.
Metadata
Release files for Irene 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| irene-1.5.0.tar.gz | 167.3 kB | Without provenance | Details for irene-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| irene-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for irene-1.5.0-py3-none-any.whl |
Total release size: 327.7 kB
Release files / irene-1.5.0.tar.gz
| Download URL | irene-1.5.0.tar.gz |
|---|---|
| Size | 167.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f4f83fbd23a61ed6a7c1c68cdd24cf3b252678c96d6086ee41b81f5a16985ca2
|
|
BLAKE2b-256 checksum How to use checksums |
3edf5655c9bf17b9968353a10229040b6480ed12c174cfc211904c36bb9673da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / irene-1.5.0-py3-none-any.whl
| Download URL | irene-1.5.0-py3-none-any.whl |
|---|---|
| Size | 160.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45d20f12f519693b8f3e679d0bfc50290816a9dedd917b7d9b8c61bf899344d3
|
|
BLAKE2b-256 checksum How to use checksums |
2dbc9186cdc16fe334f3dfc776b4af282ad73c69e0a1b27577a770e89774efb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for Irene 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.