Skip to main content

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

  • Packaging target: 2.0.0.dev0 (defined in pyproject.toml)

  • 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.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Irene 1.4.0
File Size Uploaded Provenance Actions
irene-1.4.0.tar.gz 162.5 kB Without provenance Details for irene-1.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Irene 1.4.0
File Interpreter ABI Platform Actions
irene-1.4.0-py3-none-any.whl Python 3 none any Details for irene-1.4.0-py3-none-any.whl

Total release size: 320.4 kB

Release files / irene-1.4.0.tar.gz

Download URL irene-1.4.0.tar.gz
Size 162.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e4f93dd962e02e785801d2631710d69834ccbae11fff0240f370c422deb3a342
BLAKE2b-256 checksum
How to use checksums
f5e86436dbb24fb2abbc1be8490d550c597c52bb7f956534f653ee61bd9bcd0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / irene-1.4.0-py3-none-any.whl

Download URL irene-1.4.0-py3-none-any.whl
Size 157.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df698b66cf39d720cf69acbbe7663c265c78c5a46eacfb9c961516bbb1193652
BLAKE2b-256 checksum
How to use checksums
84c732803fedf270192570d9d522a16a1e58ecb524c402bfcc739c310c925f59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for Irene 1.4.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.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page