Skip to content

Conversation

@pobonomo
Copy link
Member

@pobonomo pobonomo commented Oct 7, 2025

No description provided.

@pobonomo pobonomo linked an issue Oct 7, 2025 that may be closed by this pull request
@pobonomo pobonomo added the safe to test If applied to a PR, will start the tests that require a Gurobi license label Oct 7, 2025
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Pierre Bonami seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pobonomo pobonomo requested a review from Copilot October 30, 2025 08:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for ONNX (Open Neural Network Exchange) models to gurobi-ml, enabling formulation of ONNX-based neural networks into Gurobi optimization models. The implementation focuses on sequential multi-layer perceptrons with Gemm/MatMul operations and ReLU activations, consistent with existing Keras and PyTorch support.

Key changes:

  • New ONNX module with model parsing and constraint generation
  • Test infrastructure for ONNX formulations and cross-framework equivalence testing
  • Documentation updates and example notebook demonstrating adversarial attacks with ONNX models

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tox.ini Added ONNX test environments and dependencies to the test matrix
tests/test_onnx/test_onnx_formulations.py Test cases for ONNX model formulations using Gemm and MatMul operations
tests/test_onnx/test_onnx_exceptions.py Tests for unsupported ONNX operations
tests/test_composite/test_framework_onnx_equivalence.py Cross-framework tests verifying ONNX conversions produce equivalent results
src/gurobi_ml/registered_predictors.py Registered ONNX convertor with predictor registry
src/gurobi_ml/onnx/onnx_model.py Core implementation of ONNX model parsing and Gurobi formulation
src/gurobi_ml/onnx/init.py ONNX module initialization and exports
requirements.onnx.txt ONNX package dependencies
notebooks/adversarial/adversarial_onnx.ipynb Example notebook demonstrating adversarial attacks using ONNX
docs/source/user/supported.rst Documentation for ONNX support
docs/source/index.rst Updated framework list to include ONNX
docs/source/api.rst Added ONNX API documentation section

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test If applied to a PR, will start the tests that require a Gurobi license

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ONNX support to Gurobi Machine Learning

2 participants