  A standard tool for modelling real-world optimisation problems is
mixed-integer programming (MIP). However, for many of these problems,
information about the relationships between variables is either incomplete or
highly complex, making it difficult or even impossible to model the problem
directly. To overcome these hurdles, machine learning (ML) predictors are often
used to represent these relationships and are then embedded in the MIP as
surrogate models. Due to the large amount of available ML frameworks and the
complexity of many ML predictors, formulating such predictors into MIPs is a
highly non-trivial task. In this paper, we introduce PySCIPOpt-ML, an
open-source tool for the automatic formulation and embedding of trained ML
predictors into MIPs. By directly interfacing with a broad range of commonly
used ML frameworks and an open-source MIP solver, PySCIPOpt-ML provides a way
to easily integrate ML constraints into optimisation problems. Alongside
PySCIPOpt-ML, we introduce, SurrogateLIB, a library of MIP instances with
embedded ML constraints, and present computational results over SurrogateLIB,
providing intuition on the scale of ML predictors that can be practically
embedded. The project is available at
https://github.com/Opt-Mucca/PySCIPOpt-ML.
