Logo

PyEPO

A PyTorch-based End-to-End Predict-and-Optimize Tool

PyEPO (PyTorch-based End-to-End Predict-and-Optimize Tool) is a Python-based, open-source software that supports modeling and solving predict-and-optimize problems with the linear objective function. The core capability of PyEPO is to build optimization models with GurobiPy, Pyomo, 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 SPO+ loss [1] and differentiable Black-Box optimizer [3] as PyTorch autograd functions.