Skip to main content

PyTorch-based End-to-End Predict-then-Optimize Tool

Project description

PyEPO: A PyTorch-based End-to-End Predict-then-Optimize Tool

PyEPO (PyTorch-based End-to-End Predict-then-Optimize Tool) is a Python-based, open-source software that supports modeling and solving predict-then-optimize problems with linear objective functions. The core capability of PyEPO is to build optimization models with GurobiPy, COPT, Pyomo, Google OR-Tools, MPAX, or any other solvers and algorithms, then embed the optimization model into an artificial neural network for the end-to-end training. For this purpose, PyEPO implements various methods as PyTorch autograd modules.

Features

  • Implement SPO+, DBB, NID, DPO, PFYL, NCE, LTR, I-MLE, AI-MLE, and PG
  • Support Gurobi, COPT, Pyomo, Google OR-Tools, and MPAX API
  • Support parallel computing for optimization solvers
  • Support solution caching to speed up training
  • Support kNN robust loss to improve decision quality

GPU-Accelerated Solving with MPAX

PyEPO integrates MPAX, a JAX-based mathematical programming solver using the PDHG algorithm for GPU-accelerated optimization. Key advantages: (1) GPU-native solving — the first-order PDHG method runs efficiently on GPU; (2) batch solving — an entire mini-batch can be solved simultaneously via vectorization; (3) no GPU-CPU data transfer overhead — both the neural network and the solver stay on GPU, eliminating the data transfer bottleneck.

Documentation

The official docs can be found at https://khalil-research.github.io/PyEPO.

Publication

PyEPO: A PyTorch-based End-to-End Predict-then-Optimize Library for Linear and Integer Programming (Mathematical Programming Computation)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyepo-1.1.1.tar.gz (51.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyepo-1.1.1-py3-none-any.whl (84.2 kB view details)

Uploaded Python 3

File details

Details for the file pyepo-1.1.1.tar.gz.

File metadata

  • Download URL: pyepo-1.1.1.tar.gz
  • Upload date:
  • Size: 51.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyepo-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2136c99333737a897d267b76c68ba12670b35fbce413fc08a50568fe11fc4ad8
MD5 135d1ddb4d6959851b75ba2bfa59dbaf
BLAKE2b-256 8515cc90a323384dd7183025b31d56d5511fdde80684da1e5755605331d24ed0

See more details on using hashes here.

File details

Details for the file pyepo-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyepo-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 84.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for pyepo-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b00126004966a90e92236a9a699939157ccc60a3c1b5119d9cfc37b999ea08c7
MD5 c77e9d4dfd905d5f0189d1e073f183ab
BLAKE2b-256 4295b76c9330445f5e2705adcfc8500062b3465ce5501786327ef6a4e45eb4db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page