Tutorial

This guide walks through the main PyEPO workflow for predict-then-optimize problems: define an optimization model, build an optimization-aware dataset, choose a training module, train a predictor, and evaluate decision quality.

Where to Start

  • New to PyEPO — read the pages below in order. Model and Data set up the modeling primitives; Two-Stage Method introduces the regression baseline; Autograd Functions and Training cover the end-to-end methods; Solution Pool explains the cached solution pool shared by the contrastive and learning-to-rank methods; Evaluation defines the metrics.

  • Want to pick a method — jump to the Choosing a Method section of Autograd Functions. It poses three questions (what supervision you have, whether you want a loss or a solution, special constraints) and points you at the right module.

  • Prefer hands-on — jump to the Notebooks section below for runnable Colab examples grouped by purpose.

Notebooks

Each notebook is a self-contained Colab walkthrough. They are grouped by purpose, and most entries link back to the docs section that explains the underlying API.

Getting Started

Method Deep Dives

GPU Acceleration

Applied Examples

Reference Pages