CVXPY Summary
cvxpy_summary is a lightweight utility package for inspecting and debugging CVXPY optimization models. It provides a compact summary of a cvxpy.Problem, including DCP/DQCP/DPP status, constraint and variable counts (with scalar breakdown), parameter presence, and solver statistics. Optional detailed listings report each variable/parameter’s name, shape, size, and integrality (boolean/integer) flags to quickly diagnose modeling and scalability issues.
An example output is shown below when I am solving a unit commitment problem with CVXPY.
Install
From PyPI:
pip install cvxpy-summary
Editable from a local checkout:
pip install -e .
Or pin to a GitHub tag/commit:
pip install "git+https://github.com/xuwkk/cvxpy_summary.git@v0.1.2"
# or @<commit-sha>
Usage
import cvxpy as cp
from cvxpy_summary import print_summary
x = cp.Variable(3)
prob = cp.Problem(cp.Minimize(cp.sum_squares(x)), [x >= 0])
print_summary(prob, include_entity_details=True)
The attributes of the print_summary function are:
prob: The CVXPY problem to summarize.include_entity_details: If True, include detailed listings of variables and parameters.sort_entities_by: The sorting order for the detailed listings.max_entities: The maximum number of entities to include in the detailed listings.
Metadata
Release files for cvxpy-summary 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cvxpy_summary-0.1.2.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cvxpy_summary-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.3 kB
Release files / cvxpy_summary-0.1.2.tar.gz
| Download URL | cvxpy_summary-0.1.2.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c35f672e78ab54731e116410b28d18b52cba91cf92a4c4cbf858aee58b310ec
|
|
BLAKE2b-256 checksum How to use checksums |
4e6f2baa067cac64cc27f5cbadc3d0cfcb23108eb07319e2c48ae78cc94cc2bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|
Release files / cvxpy_summary-0.1.2-py3-none-any.whl
| Download URL | cvxpy_summary-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fd37c60a74e6e21eac07d1447e49e98086f2b01357a35be67fc712108923225
|
|
BLAKE2b-256 checksum How to use checksums |
ec138abe7817571c98bc509e131e5216623ae3f692935c1e3506e2e7017b148c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.18
|