From 2792fc4308f06b3160cf9b2e5fc6284700af8885 Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Mon, 10 Nov 2025 14:45:55 -0500 Subject: [PATCH 1/3] Upgrade XGBoost to 3.0.4 (#414) * Bumping XGBoost to 2.1.3 * Moving to XGBoost 3.0.4 for compatibility. * Pom file updates to latest versions of Maven plugins. * Force XGBoost to save in ubj format, which has been the default since XGBoost 2.1. * Moving from Java 24 to Java 25 in the CI and adding a Linux aarch64 runner. * Adding libomp to macOS github actions. * Adding libomp install to the 21 and 25 macOS CI runs. --- .github/workflows/maven-macos-aarch64.yml | 10 +++- .github/workflows/maven-macos-x64.yml | 10 +++- .github/workflows/maven-ubuntu-aarch64.yml | 28 +++++++++ ...{maven-ubuntu.yml => maven-ubuntu-x64.yml} | 6 +- .github/workflows/maven-windows.yml | 6 +- AnomalyDetection/pom.xml | 38 ------------ .../classification/xgboost/TestXGBoost.java | 2 - Classification/pom.xml | 38 ------------ Clustering/pom.xml | 38 ------------ Common/XGBoost/pom.xml | 4 ++ .../common/xgboost/XGBoostExternalModel.java | 6 +- .../tribuo/common/xgboost/XGBoostModel.java | 8 +-- Common/pom.xml | 38 ------------ Core/pom.xml | 3 +- Interop/Core/pom.xml | 1 - Interop/ModelCard/pom.xml | 1 - Interop/pom.xml | 38 ------------ Json/pom.xml | 1 - Math/pom.xml | 5 -- MultiLabel/pom.xml | 38 ------------ .../regression/xgboost/TestXGBoost.java | 8 +-- Regression/pom.xml | 38 ------------ Reproducibility/pom.xml | 1 - THIRD_PARTY_LICENSES.txt | 2 +- Util/Tokenization/pom.xml | 1 - Util/pom.xml | 38 ------------ pom.xml | 58 +++++++++---------- tests/pom.xml | 1 - 28 files changed, 93 insertions(+), 373 deletions(-) create mode 100644 .github/workflows/maven-ubuntu-aarch64.yml rename .github/workflows/{maven-ubuntu.yml => maven-ubuntu-x64.yml} (89%) diff --git a/.github/workflows/maven-macos-aarch64.yml b/.github/workflows/maven-macos-aarch64.yml index 94259f316..b1e36f3cb 100644 --- a/.github/workflows/maven-macos-aarch64.yml +++ b/.github/workflows/maven-macos-aarch64.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Tribuo CI (macOS aarch64, Java SE 17, 21, 24) +name: Tribuo CI (macOS aarch64, Java SE 17, 21, 25) on: push: @@ -15,12 +15,14 @@ jobs: strategy: matrix: # test against supported LTS versions and latest - java: [ 21, 24 ] + java: [ 21, 25 ] name: macOS aarch64 Java SE ${{ matrix.java }} steps: - uses: actions/checkout@v4 + - name: Install libomp for XGBoost + run: brew install libomp - name: Setup Oracle Java SE - uses: oracle-actions/setup-java@v1.4.1 + uses: oracle-actions/setup-java@v1.5.0 with: website: oracle.com release: ${{ matrix.java }} @@ -31,6 +33,8 @@ jobs: name: macOS aarch64 Java SE 17 steps: - uses: actions/checkout@v4 + - name: Install libomp for XGBoost + run: brew install libomp - name: Setup Oracle Java SE uses: oracle-actions/setup-java@v1.4.1 with: diff --git a/.github/workflows/maven-macos-x64.yml b/.github/workflows/maven-macos-x64.yml index 395ad5df6..be07c8582 100644 --- a/.github/workflows/maven-macos-x64.yml +++ b/.github/workflows/maven-macos-x64.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Tribuo CI (macOS x86_64, Java SE 17, 21, 24) +name: Tribuo CI (macOS x86_64, Java SE 17, 21, 25) on: push: @@ -15,12 +15,14 @@ jobs: strategy: matrix: # test against supported LTS versions and latest - java: [ 21, 24 ] + java: [ 21, 25 ] name: macOS x86_64 Java SE ${{ matrix.java }} steps: - uses: actions/checkout@v4 + - name: Install libomp for XGBoost + run: brew install libomp - name: Setup Oracle Java SE - uses: oracle-actions/setup-java@v1.4.1 + uses: oracle-actions/setup-java@v1.5.0 with: website: oracle.com release: ${{ matrix.java }} @@ -31,6 +33,8 @@ jobs: name: macOS x86_64 Java SE 17 steps: - uses: actions/checkout@v4 + - name: Install libomp for XGBoost + run: brew install libomp - name: Setup Oracle Java SE uses: oracle-actions/setup-java@v1.4.1 with: diff --git a/.github/workflows/maven-ubuntu-aarch64.yml b/.github/workflows/maven-ubuntu-aarch64.yml new file mode 100644 index 000000000..63aa7b08f --- /dev/null +++ b/.github/workflows/maven-ubuntu-aarch64.yml @@ -0,0 +1,28 @@ +# This workflow will build a Java project with Maven +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Tribuo CI (Ubuntu aarch64, Java SE 21, 25) + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-24.04-arm + strategy: + matrix: + # test against supported LTS versions and latest + java: [ 21, 25 ] + name: Ubuntu Java SE ${{ matrix.java }} + steps: + - uses: actions/checkout@v4 + - name: Setup Oracle Java SE + uses: oracle-actions/setup-java@v1.5.0 + with: + website: oracle.com + release: ${{ matrix.java }} + - name: Build with Maven + run: mvn -B package --file pom.xml -Parm diff --git a/.github/workflows/maven-ubuntu.yml b/.github/workflows/maven-ubuntu-x64.yml similarity index 89% rename from .github/workflows/maven-ubuntu.yml rename to .github/workflows/maven-ubuntu-x64.yml index 8ff4d395d..d044865c3 100644 --- a/.github/workflows/maven-ubuntu.yml +++ b/.github/workflows/maven-ubuntu-x64.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Tribuo CI (Ubuntu x86_64, Java SE 17, 21, 24) +name: Tribuo CI (Ubuntu x86_64, Java SE 17, 21, 25) on: push: @@ -15,12 +15,12 @@ jobs: strategy: matrix: # test against supported LTS versions and latest - java: [ 21, 24 ] + java: [ 21, 25 ] name: Ubuntu Java SE ${{ matrix.java }} steps: - uses: actions/checkout@v4 - name: Setup Oracle Java SE - uses: oracle-actions/setup-java@v1.4.1 + uses: oracle-actions/setup-java@v1.5.0 with: website: oracle.com release: ${{ matrix.java }} diff --git a/.github/workflows/maven-windows.yml b/.github/workflows/maven-windows.yml index e16b6e6b6..dd254eb7d 100644 --- a/.github/workflows/maven-windows.yml +++ b/.github/workflows/maven-windows.yml @@ -1,7 +1,7 @@ # This workflow will build a Java project with Maven # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -name: Tribuo CI (Windows x86_64, Java SE 17, 21, 24) +name: Tribuo CI (Windows x86_64, Java SE 17, 21, 25) on: push: @@ -15,12 +15,12 @@ jobs: strategy: matrix: # test against supported LTS versions and latest - java: [ 21, 24 ] + java: [ 21, 25 ] name: Windows Java SE ${{ matrix.java }} steps: - uses: actions/checkout@v4 - name: Setup Oracle Java SE - uses: oracle-actions/setup-java@v1.4.1 + uses: oracle-actions/setup-java@v1.5.0 with: website: oracle.com release: ${{ matrix.java }} diff --git a/AnomalyDetection/pom.xml b/AnomalyDetection/pom.xml index 9d3cf0097..3ef07007a 100644 --- a/AnomalyDetection/pom.xml +++ b/AnomalyDetection/pom.xml @@ -65,42 +65,4 @@ - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.3.1 - - protected - false - true - true - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.0 - - - org.apache.maven.plugins - maven-compiler-plugin - 3.13.0 - - ${tribuo.java.version} - ${tribuo.java.version} - - -Xlint:all - - - - - org.apache.maven.plugins - maven-assembly-plugin - 3.3.0 - - - - diff --git a/Classification/XGBoost/src/test/java/org/tribuo/classification/xgboost/TestXGBoost.java b/Classification/XGBoost/src/test/java/org/tribuo/classification/xgboost/TestXGBoost.java index 8abd566b1..4c437a3fa 100644 --- a/Classification/XGBoost/src/test/java/org/tribuo/classification/xgboost/TestXGBoost.java +++ b/Classification/XGBoost/src/test/java/org/tribuo/classification/xgboost/TestXGBoost.java @@ -243,7 +243,6 @@ public void testDenseData() { Map overrideParams = new HashMap<>(); overrideParams.put("objective","multi:softprob"); overrideParams.put("eta","0.1"); - overrideParams.put("sampling_method","gradient_based"); XGBoostClassificationTrainer overrideTrainer = new XGBoostClassificationTrainer(5, overrideParams); XGBoostModel