This release is a pre-release and may not be stable for production use.
omnibias-convex
Optimize inside explicit constraints. A barrier path approaches the constrained quadratic optimum.
Static poster · Narrow-screen animation · How this visual is computed
Linear or quadratic objectives and explicit constraints enter; primal candidates, dual information, implicit gradients and checked bounds leave. This is an optimization engine and certificate backend, not a generic neural-network layer factory.
The animation uses computed outputs to explain this package. Frame transitions are illustrative unless a training step is explicitly identified; it is not a performance comparison.
API reference · Source · Tests · Talk to Derivon
The mathematical connection
The log-barrier continuation follows an interior path toward a constrained solution. It shares the idea of progressively removing a smooth approximation with temperature collapse, but its parameter and feasibility semantics are those of the barrier problem. Bias collapse is not needed for its closed-form quadratic/barrier derivatives. Finite termination tolerances must be checked.
Run this README
The examples use omnibias-convex[torch] on Python >=3.10. Their installed-wheel
profile selects runtime features, not an editable workspace. Install the prepared
prerelease from PyPI:
python -m pip install --pre "omnibias-convex[torch]==0.1.0a2"
For local development before publication, build and test the coordinated wheelhouse using the release guide. The package's wheel profile executes the examples below outside the source checkout.
Existing published consumers may need historical primitive versions; see the compatibility policy.
Why this package exists
Many scientific and decision workflows need a constrained solve inside a larger model. Convex separates problem data, a numerical candidate and its optimality checks. This makes it possible to inspect feasibility and use a differentiable layer where the chosen solve and its regularity assumptions support it.
What you can build
- Linear and quadratic objectives with explicit inequality constraints.
- Log-barrier solver configuration and implicit differentiation layers.
- Dual lower bounds, optimality enclosures and reusable warm starts.
Use convex as a continuous optimization primitive or a bound backend for discrete applications. Start with a small independently solvable problem, check residuals and slacks, then integrate the layer into the surrounding training objective. Named application frontends belong outside this package.
A working example
import torch
from omnibias.convex.torch import solve_qp
# Minimize 0.5*x**2 - 0.5*x over -1 <= x <= 1; optimum is x=0.5.
solution = solve_qp([[1.]], [-0.5], [[1.], [-1.]], [1., 1.], x0=[0.])
assert solution.converged
assert torch.all(solution.slack > 0)
assert abs(float(solution.x[0]) - 0.5) < 1e-3
print(solution.gap)
Choose the right contract
A finite barrier iterate is not automatically an exact optimizer. Inspect converged, gap and slack rather than treating a returned vector as certified. Implicit gradients need appropriate regularity, especially when active constraints change. The solver and certificate functions expose different claims.
Explore and validate
The API guide contains the generated module/export inventory. Use it to find the focused implementation rather than guessing a symbol from another package. The capability map connects the primitives to larger scientific workflows.
From the main repository, run the package’s regression suite:
uv run pytest packages/omnibias-convex/tests -q
License
AGPL-3.0-or-later or commercial. See LICENSE and the licensing policy. Comply with the AGPL terms or obtain a signed commercial grant; commercial use alone does not require payment. Commercial terms describe the alternative. Previously distributed Apache editions, where applicable, retain their original grants.
Metadata
Release files for omnibias-convex 0.1.0a2
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 |
|---|---|---|---|---|
| omnibias_convex-0.1.0a2.tar.gz | 61.8 kB | With provenance | Details for omnibias_convex-0.1.0a2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| omnibias_convex-0.1.0a2-py3-none-any.whl | Python 3 | none | any | Details for omnibias_convex-0.1.0a2-py3-none-any.whl |
Total release size: 118.9 kB
Release files / omnibias_convex-0.1.0a2.tar.gz
| Download URL | omnibias_convex-0.1.0a2.tar.gz |
|---|---|
| Size | 61.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
402181da327924666f4f6fb106cb993835442153db0d31596e7f89309550ad0d
|
|
BLAKE2b-256 checksum How to use checksums |
3864f4680c2de279b79d1a168b8efea8ee679ccd6914b828191e61e603e058e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / omnibias_convex-0.1.0a2-py3-none-any.whl
| Download URL | omnibias_convex-0.1.0a2-py3-none-any.whl |
|---|---|
| Size | 57.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fccbcf6c78c634d972b406a08bc54c6fbd4873c51dd5c4ba2f3c407fba888d9
|
|
BLAKE2b-256 checksum How to use checksums |
ba4c48e95f3b39657285153a9bcfc3c5e01e526f3ac70757f3db43626e977f6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logSecurity for omnibias-convex 0.1.0a2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for omnibias_convex-0.1.0a2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logA 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.