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 (additive and multiplicative perturbations), PFYL (additive and multiplicative perturbations), L2-regularized RFWO/RFYL, 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.3.4.tar.gz (89.1 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.3.4-py3-none-any.whl (102.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyepo-1.3.4.tar.gz
  • Upload date:
  • Size: 89.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyepo-1.3.4.tar.gz
Algorithm Hash digest
SHA256 976b427f80ec72382e985e1aefcc672627a13626310b7e98bd93f5053ec143f4
MD5 2e907cdd84a59b72ee0e8c67a4158b75
BLAKE2b-256 31adf1382ebe4c4d1e0a401cd1fe9a959daf2fd6283f00ce57cec26b2feb765a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyepo-1.3.4-py3-none-any.whl
  • Upload date:
  • Size: 102.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyepo-1.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1ff797aede6ac9e577aa3ba4ed986faf84950a47d71e4b484f8bf4f0cf25a802
MD5 cc7557bd9bafaf3e0f007a802dff9c0c
BLAKE2b-256 8250e776f14204a1ec935b712e3484d1dda4d33d1de8d2b0f20e75d6c9d2f8b3

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