Skip to content

Optora

Optora is a pre-alpha optimization library focused on a small GPU-first PyTorch deterministic core that can grow toward stochastic methods, differentiable backends, optimal transport, and reinforcement learning.

Latest release: v0.0.6

Get started Examples API reference

Why Optora

  • Robust by construction


    Optimize against the worst case over an ambiguity set instead of trusting a single empirical distribution.

    Formulations

  • Five ambiguity sets


    Kullback-Leibler, \(\phi\)-divergence, \(\chi^2\), total variation, and Wasserstein, all behind one AmbiguitySet contract.

    API reference

  • GPU-first


    Vectorized PyTorch throughout, with tensor state that moves to an accelerator through a single .to(device) call.

  • Verified numerics


    Each formulation is checked against closed forms, independent grid searches, and convergence limits under mypy's strict mode.

    Examples

Install

pip install optora

For local development, install the project in editable mode with the developer and documentation extras:

pip install -e ".[dev,docs]"

Build documentation

python -m tools.docs serve
python -m tools.docs build

The API reference is generated

tools.docs discovers every public module under optora/, writes one page per module, and rewrites the API navigation. Never edit the generated pages by hand.

Contributing

Development workflow, coding style, and the pull request checklist live in CONTRIBUTING.md.