From 77afe62f5c96e22b3d5d787d7a492f80333a8ac3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 21:21:49 +0000 Subject: [PATCH 1/8] Bump onnx from 1.17.0 to 1.21.0 in /isolation-forest-onnx Bumps [onnx](https://github.com/onnx/onnx) from 1.17.0 to 1.21.0. - [Release notes](https://github.com/onnx/onnx/releases) - [Changelog](https://github.com/onnx/onnx/blob/main/docs/Changelog-ml.md) - [Commits](https://github.com/onnx/onnx/compare/v1.17.0...v1.21.0) --- updated-dependencies: - dependency-name: onnx dependency-version: 1.21.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- isolation-forest-onnx/requirements.txt | 2 +- isolation-forest-onnx/setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/isolation-forest-onnx/requirements.txt b/isolation-forest-onnx/requirements.txt index adba846..9b70ff7 100644 --- a/isolation-forest-onnx/requirements.txt +++ b/isolation-forest-onnx/requirements.txt @@ -1,5 +1,5 @@ avro-python3==1.9.1 numpy==1.26.4 -onnx==1.17.0 +onnx==1.21.0 onnxruntime==1.19.2 protobuf==5.29.6 diff --git a/isolation-forest-onnx/setup.cfg b/isolation-forest-onnx/setup.cfg index da69396..b65a207 100644 --- a/isolation-forest-onnx/setup.cfg +++ b/isolation-forest-onnx/setup.cfg @@ -17,7 +17,7 @@ python_requires = >=3.9 install_requires = avro_python3==1.9.1 numpy==1.26.4 - onnx==1.17.0 + onnx==1.21.0 onnxruntime==1.18.0 protobuf==5.29.6 From 7de72bcc505019d0d437f6a264c2927a6cb8f399 Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 15:32:36 -0700 Subject: [PATCH 2/8] Pin ONNX model IR version to 10 for onnxruntime compatibility onnx 1.21.0 defaults to IR version 13, which is unsupported by onnxruntime < 1.24.1. Since the model only uses opset 14, IR version 10 is sufficient and ensures broad onnxruntime compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/isolationforestonnx/isolation_forest_converter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py b/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py index b196c7d..a683ccf 100644 --- a/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py +++ b/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py @@ -161,6 +161,7 @@ def convert(self) -> ModelProto: helper.make_opsetid("", 14), ], ) + model.ir_version = 10 try: checker.check_model(model) From c8fa9490e2f4a0dcf19d6ee7a291542dc09c496c Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 15:47:55 -0700 Subject: [PATCH 3/8] Upgrade onnxruntime, numpy, and Python version for onnx 1.21.0 compatibility - Upgrade onnxruntime from 1.19.2/1.18.0 to 1.24.1 (supports IR version 13 that onnx 1.21.0 produces by default) - Upgrade numpy from 1.26.4 to 2.2.6 and fix np.trapz -> np.trapezoid (trapz was removed in numpy 2.0) - Update python_requires from >=3.9 to >=3.10 (required by onnx 1.21.0) - Remove the ir_version=10 pin since onnxruntime 1.24.1 natively supports IR version 13 Co-Authored-By: Claude Opus 4.6 (1M context) --- isolation-forest-onnx/requirements.txt | 4 ++-- isolation-forest-onnx/setup.cfg | 6 +++--- .../src/isolationforestonnx/isolation_forest_converter.py | 1 - .../test/test_isolation_forest_converter.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/isolation-forest-onnx/requirements.txt b/isolation-forest-onnx/requirements.txt index 9b70ff7..a37555d 100644 --- a/isolation-forest-onnx/requirements.txt +++ b/isolation-forest-onnx/requirements.txt @@ -1,5 +1,5 @@ avro-python3==1.9.1 -numpy==1.26.4 +numpy==2.2.6 onnx==1.21.0 -onnxruntime==1.19.2 +onnxruntime==1.24.1 protobuf==5.29.6 diff --git a/isolation-forest-onnx/setup.cfg b/isolation-forest-onnx/setup.cfg index b65a207..4a7af12 100644 --- a/isolation-forest-onnx/setup.cfg +++ b/isolation-forest-onnx/setup.cfg @@ -13,12 +13,12 @@ keywords = isolation forest, ONNX packages = isolationforestonnx package_dir = = src -python_requires = >=3.9 +python_requires = >=3.10 install_requires = avro_python3==1.9.1 - numpy==1.26.4 + numpy==2.2.6 onnx==1.21.0 - onnxruntime==1.18.0 + onnxruntime==1.24.1 protobuf==5.29.6 [options.extras_require] diff --git a/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py b/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py index a683ccf..b196c7d 100644 --- a/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py +++ b/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py @@ -161,7 +161,6 @@ def convert(self) -> ModelProto: helper.make_opsetid("", 14), ], ) - model.ir_version = 10 try: checker.check_model(model) diff --git a/isolation-forest-onnx/test/test_isolation_forest_converter.py b/isolation-forest-onnx/test/test_isolation_forest_converter.py index 93bbc22..fc9ed40 100644 --- a/isolation-forest-onnx/test/test_isolation_forest_converter.py +++ b/isolation-forest-onnx/test/test_isolation_forest_converter.py @@ -69,7 +69,7 @@ def _roc_auc_score(y_true, y_score): fpr = np.concatenate(([0], fpr)) # Compute the AUC using trapezoidal integration - auc = np.trapz(tpr, fpr) + auc = np.trapezoid(tpr, fpr) return auc From f16c9203d57ee342a4360b146050da996872600e Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 18:06:21 -0700 Subject: [PATCH 4/8] Align Python version in CI and Black config with python_requires >=3.10 - Update pypi-publish job from Python 3.9 to 3.10 - Update Black target-version from py39 to py310 Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 2 +- isolation-forest-onnx/pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f26f28a..a34f53f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 # https://github.com/actions/setup-python with: - python-version: '3.9' + python-version: '3.10' - name: Publish to PyPI run: ./gradlew publishPythonPackage env: diff --git a/isolation-forest-onnx/pyproject.toml b/isolation-forest-onnx/pyproject.toml index f61e8ce..56dc1d7 100644 --- a/isolation-forest-onnx/pyproject.toml +++ b/isolation-forest-onnx/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 88 -target-version = ['py39'] +target-version = ['py310'] exclude = ''' /( venv From f0fc7d372cbb005076e0a6edb8458cd42176f8cf Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 18:13:39 -0700 Subject: [PATCH 5/8] Pin ONNX model IR version to 10 for maximum runtime portability The model only uses opset 14, which is fully supported by IR version 10. Pinning avoids requiring onnxruntime >= 1.24.1 or other recent runtimes just to load the model, maximizing cross-platform compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/isolationforestonnx/isolation_forest_converter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py b/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py index b196c7d..d14c355 100644 --- a/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py +++ b/isolation-forest-onnx/src/isolationforestonnx/isolation_forest_converter.py @@ -161,6 +161,9 @@ def convert(self) -> ModelProto: helper.make_opsetid("", 14), ], ) + # Pin IR version for maximum portability across ONNX runtimes. + # The model only uses opset 14, which is fully supported by IR 10. + model.ir_version = 10 try: checker.check_model(model) From f20e538d765c1378589cd2e0f5d4f5809ad0f6de Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 18:37:47 -0700 Subject: [PATCH 6/8] Add explicit Python setup to the build job The build job runs Gradle which creates a Python venv for the isolation-forest-onnx tests. Without setup-python, it relies on whatever python3 the runner provides, which is implicit and fragile. Pin to 3.10 to match python_requires. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a34f53f..3a122aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,6 +71,10 @@ jobs: with: distribution: 'temurin' java-version: ${{ matrix.java-version }} + - name: Set up Python + uses: actions/setup-python@v6 # https://github.com/actions/setup-python + with: + python-version: '3.10' - name: Perform build env: SCALA_VERSION: ${{ matrix.scala-version }} From c8de5dc9ecc68b0eed1ce125a5a77d58e33ab3a1 Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 18:47:23 -0700 Subject: [PATCH 7/8] Raise minimum Python to 3.12 onnxruntime 1.24.x only ships Linux wheels for Python 3.11+, and 3.12 is the current ubuntu-latest default. Since this is a converter tool (not a foundational library), targeting 3.12 is a practical baseline that ensures all dependencies have prebuilt wheels. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/ci.yml | 4 ++-- isolation-forest-onnx/pyproject.toml | 2 +- isolation-forest-onnx/setup.cfg | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a122aa..05a2e2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,7 +74,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 # https://github.com/actions/setup-python with: - python-version: '3.10' + python-version: '3.12' - name: Perform build env: SCALA_VERSION: ${{ matrix.scala-version }} @@ -116,7 +116,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v6 # https://github.com/actions/setup-python with: - python-version: '3.10' + python-version: '3.12' - name: Publish to PyPI run: ./gradlew publishPythonPackage env: diff --git a/isolation-forest-onnx/pyproject.toml b/isolation-forest-onnx/pyproject.toml index 56dc1d7..97b7b13 100644 --- a/isolation-forest-onnx/pyproject.toml +++ b/isolation-forest-onnx/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 88 -target-version = ['py310'] +target-version = ['py312'] exclude = ''' /( venv diff --git a/isolation-forest-onnx/setup.cfg b/isolation-forest-onnx/setup.cfg index 4a7af12..acf2a93 100644 --- a/isolation-forest-onnx/setup.cfg +++ b/isolation-forest-onnx/setup.cfg @@ -13,7 +13,7 @@ keywords = isolation forest, ONNX packages = isolationforestonnx package_dir = = src -python_requires = >=3.10 +python_requires = >=3.12 install_requires = avro_python3==1.9.1 numpy==2.2.6 From 3a1f1ffe3b711ce71e49928d99a019e3c006038e Mon Sep 17 00:00:00 2001 From: James Verbus Date: Tue, 7 Apr 2026 19:14:23 -0700 Subject: [PATCH 8/8] Set python_requires to >=3.11 based on actual dependency floor onnxruntime 1.24.1 only ships wheels for Python 3.11+, making that the true minimum. CI remains on 3.12 (runner default with full wheel coverage), but the package contract should reflect what users can actually install, not what CI happens to run. Co-Authored-By: Claude Opus 4.6 (1M context) --- isolation-forest-onnx/pyproject.toml | 2 +- isolation-forest-onnx/setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/isolation-forest-onnx/pyproject.toml b/isolation-forest-onnx/pyproject.toml index 97b7b13..a67ed70 100644 --- a/isolation-forest-onnx/pyproject.toml +++ b/isolation-forest-onnx/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 88 -target-version = ['py312'] +target-version = ['py311'] exclude = ''' /( venv diff --git a/isolation-forest-onnx/setup.cfg b/isolation-forest-onnx/setup.cfg index acf2a93..b0814eb 100644 --- a/isolation-forest-onnx/setup.cfg +++ b/isolation-forest-onnx/setup.cfg @@ -13,7 +13,7 @@ keywords = isolation forest, ONNX packages = isolationforestonnx package_dir = = src -python_requires = >=3.12 +python_requires = >=3.11 install_requires = avro_python3==1.9.1 numpy==2.2.6