Skip to main content

CI

alt text

A Python-based Decision-Focused Learning Toolbox

PyDFLT is designed to help researchers apply and develop Decision Focused Learning (DFL) tools in Python. It uses CVXPYLayers [1] for differentiable models, PyEPO [2] for models with a linear objective and has an implementation of SFGE [3] and Lancer [4]. To help with research, it supports Weights & Biases (https://wandb.ai/) and Optuna (https://optuna.org). PyDFLT v0.1.0 is now available:

pip install pydflt

Documentation

Documentation can be found https://pydflt.github.io/documentation.

How to cite

If you use PyDFLT in your work, please cite the software. Citation metadata is maintained in CITATION.cff at the repo root, which also drives GitHub's "Cite this repository" widget. A BibTeX entry is provided below:

@software{pydflt,
  author  = {Noah Schutte and Kim {van den Houten} and Grigorii Veviurko},
  title   = {{PyDFLT}: A {Python}-based Decision-Focused Learning Toolbox},
  year    = {2026},
  version = {0.1.1},
  doi     = {10.5281/zenodo.XXXXXXX},
  url     = {https://github.com/PyDFLT/PyDFLT}
}

The DOI above is the Zenodo concept DOI, which always resolves to the latest archived release of PyDFLT. Update the version / year fields to match the specific release you used.

Using Weights & Biases and Optuna

Weights & Biases is a helpful tool to analyze experiments, while Optuna is an effective tool for hyperparameter tuning. To use either of these tools, make sure to check out the notebooks in the example folder.

Contributing

If you want to contribute, you can fork the repository and send a pull request. We make use of uv (https://github.com/astral-sh/uv) for the installation and testing. Install uv here. To create the virtual environment:

uv sync --all-extras --all-groups

Notice that your IDE might automatically create the environment, but does only install the basic package dependencies. Make sure to run above command to install all dependencies.

Before committing

We make use of pre-commit (https://pre-commit.com/) and pytest to ensure code is consistent and functioning properly. Both are part of the dev dependencies and therefore installed in the virtual environment. Before committing make sure to run both:

uv run pre-commit run --all-files

uv run pytest

Documentation

We use Sphinx (https://www.sphinx-doc.org/en/master/) for the documentation. All files to build the documentation are in the docs directory. To create the docs, run:

uv run make html --directory=docs

Then, open docs/build/html/api/src.html in a browser to view the created docs.

Reproducing papers

Sufficient Decision Proxies for Decision-Focused Learning, IJCAI 2026 by Noah Schutte, Krzysztof Postek, Grigorii Veviurko, and Neil Yorke-Smith

Running the experiments: see experiments/sufficient-decision-proxies-ijcai2026/REPRODUCE.md for the exact run commands per problem (portfolio, WSMC, PTSP).

References

[1] Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Diamond, and J Zico Kolter. Differentiable convex optimization layers. Advances in neural information processing systems, 32, 2019. doi:10.48550/arXiv.1910.12430.

[2] Bo Tang and Elias B. Khalil. Pyepo: a pytorch-based end-to-end predict-then-optimize library for linear and integer programming. Mathematical Programming Computation, 16(3):297–335, 2024. doi:10.1007/s12532-024-00255-x.

[3] Mattia Silvestri, Senne Berden, Jayanta Mandi, Ali ˙Irfan Mahmuto˘gulları, Maxime Mulamba, Allegra De Filippo, Tias Guns, and Michele Lombardi. Score function gradient estimation to widen the applicability of decision-focused learning. CoRR, abs/2307.05213, 2023. doi:10.48550/arXiv.2307.05213.

[4] Arman Zharmagambetov, Brandon Amos, Aaron Ferber, Taoan Huang, Bistra Dilkina, and Yuandong Tian. Landscape surrogate: Learning decision losses for mathematical optimization under partial information. Advances in Neural Information Processing Systems, 36:27332–27350, 2023. doi:10.48550/arXiv.2307.08964.

Metadata

Release files for pydflt 0.1.1

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

Source distribution (sdist)

Source distribution for pydflt 0.1.1
File Size Uploaded Provenance Actions
pydflt-0.1.1.tar.gz 104.4 kB With provenance Details for pydflt-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 229.2 kB

Release files / pydflt-0.1.1.tar.gz

Download URL pydflt-0.1.1.tar.gz
Size 104.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0fcf8a0a355f20907792ed06fac3a8b7b38431638fd8341aec92be2c78a009e8
BLAKE2b-256 checksum
How to use checksums
b277f5d7b7e795432ed300bd577517e318f7edfe4cae53f50ef432efb66dc4e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 14, 2026.

Transparency log

Release files / pydflt-0.1.1-py3-none-any.whl

Download URL pydflt-0.1.1-py3-none-any.whl
Size 124.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
920c464a4deb3d09b50fac309ceadfca8cc6443c75e31825afbfff269a0b566f
BLAKE2b-256 checksum
How to use checksums
e053da71ab28853be2899e4506ee9dbbc34f3081a1dab065cb68223c750f6f2e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 14, 2026.

Transparency log

Security for pydflt 0.1.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pydflt-0.1.1.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 May 14, 2026.

Transparency log

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

0.1.1 This release

2 release files Full 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