From 8558819c1db2dd0d88c3602c75c20b180093e86e Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 11:44:31 +0100 Subject: [PATCH 01/57] Create codecov.yml --- .github/workflows/codecov.yml | 48 +++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000000..abfe9b2f9a --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,48 @@ +#=============================================================================== +# Copyright 2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#=============================================================================== +name: CI +on: + workflow_run: + workflows: CI + types: + - completed + workflow_dispatch: +permissions: read-all +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +jobs: + upload_coverage: + runs-on: ubuntu-24.04 + # if: ${{ github.event.workflow_run.conclusion == 'success' }} + name: Codecov + steps: + - name: 'Download artifact' + uses: actions/github-script@v6 + with: + script: | + let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: context.payload.workflow_run.id, + }); + - name: Upload coverage reports to Codecov + run: | + ls -lha + curl -Os https://cli.codecov.io/latest/linux/codecov + chmod +x codecov + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service From b2f74f7baacb9d4206fbb2f5c7c0ff815505e71f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 11:47:28 +0100 Subject: [PATCH 02/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index abfe9b2f9a..fb9a6641d5 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -16,7 +16,7 @@ name: CI on: workflow_run: - workflows: CI + workflows: [CI] types: - completed workflow_dispatch: From 87d4e8892e8fe6a54c23944e446d403d7a117bc5 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 11:52:23 +0100 Subject: [PATCH 03/57] Update codecov.yml --- .github/workflows/codecov.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index fb9a6641d5..27aea2e232 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -31,6 +31,8 @@ jobs: # if: ${{ github.event.workflow_run.conclusion == 'success' }} name: Codecov steps: + - name: Install Python + uses: actions/setup-python@v5 - name: 'Download artifact' uses: actions/github-script@v6 with: @@ -43,6 +45,6 @@ jobs: - name: Upload coverage reports to Codecov run: | ls -lha - curl -Os https://cli.codecov.io/latest/linux/codecov - chmod +x codecov - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service + python -m pip install coverage codecov-cli + coverage combine + codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service From 9f9c381ed9b7bc087e605fc37639bfad973a7f23 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 11:53:33 +0100 Subject: [PATCH 04/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 27aea2e232..c7db85a8d9 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. #=============================================================================== -name: CI +name: Codecov on: workflow_run: workflows: [CI] From fe68b6c12ff9d18bb78b0521d31136154f9b8b9c Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 11:55:13 +0100 Subject: [PATCH 05/57] Update ci.yml --- .github/workflows/ci.yml | 148 --------------------------------------- 1 file changed, 148 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f19a48193..239be3cfab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,12 +40,8 @@ jobs: fail-fast: false matrix: include: - - PYTHON_VERSION: "3.9" - SKLEARN_VERSION: "1.1" - PYTHON_VERSION: "3.10" SKLEARN_VERSION: "1.2" - - PYTHON_VERSION: "3.11" - SKLEARN_VERSION: "1.3" name: LinuxNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }} runs-on: ubuntu-24.04 timeout-minutes: 120 @@ -154,147 +150,3 @@ jobs: if [ "${{ steps.set-env.outputs.DPCFLAG }}" == "" ]; then export CPU=cpu; fi export SKLEARNEX_PREVIEW='YES' bash .ci/scripts/run_sklearn_tests.sh $CPU - - sklearn_win: - strategy: - fail-fast: false - matrix: - include: - - PYTHON_VERSION: "3.9" - SKLEARN_VERSION: "1.1" - - PYTHON_VERSION: "3.10" - SKLEARN_VERSION: "1.2" - - PYTHON_VERSION: "3.11" - SKLEARN_VERSION: "1.3" - name: WindowsNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }} - runs-on: windows-2022 - timeout-minutes: 120 - - steps: - - name: Checkout Scikit-learn-intelex - uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.PYTHON_VERSION }} - - name: Get run ID of "Nightly-build" workflow - id: get-run-id - shell: bash - run: | - OTHER_REPO="uxlfoundation/oneDAL" - WF_NAME="Nightly-build" - JQ_QUERY='map(select(.event == "workflow_dispatch" or .event == "schedule")) | .[0].databaseId' - RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` - echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" - echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" - env: - GH_TOKEN: ${{ github.token }} - - name: Download oneDAL build artifact - uses: actions/download-artifact@v4 - with: - name: __release_win - github-token: ${{ github.token }} - repository: uxlfoundation/oneDAL - run-id: ${{ steps.get-run-id.outputs.run-id }} - path: ./__release_win - - name: Download Intel BaseKit artifact - uses: actions/download-artifact@v4 - with: - name: intel_oneapi_basekit - github-token: ${{ github.token }} - repository: uxlfoundation/oneDAL - run-id: ${{ steps.get-run-id.outputs.run-id }} - - name: Decompress Intel BaseKit - shell: cmd - run: | - tar -xvzf oneapi.tar.gz - echo "Unzip complete" - - name: Set Environment Variables - id: set-env - shell: cmd - run: | - echo C:\msys64\usr\bin;>> %GITHUB_PATH% - echo NO_DIST=YES>> %GITHUB_ENV% - set DPCTL_TEMP="${{ env.DPCTL_PY_VERSIONS }}" - if not %DPCTL_TEMP:${{ matrix.PYTHON_VERSION }}=%==%DPCTL_TEMP% (echo DPCFLAG=>> %GITHUB_OUTPUT%) else (echo DPCFLAG="0">> %GITHUB_OUTPUT%) - echo COVERAGE_RCFILE=%cd%\.coveragerc>> %GITHUB_ENV% - - name: Download Intel OpenCL CPU Runtime artifact - if: ${{ steps.set-env.outputs.DPCFLAG == '' }} - uses: actions/download-artifact@v4 - with: - name: opencl_rt_installer - github-token: ${{ github.token }} - repository: uxlfoundation/oneDAL - run-id: ${{ steps.get-run-id.outputs.run-id }} - path: . - - name: Install Intel OpenCL CPU Runtime - if: ${{ steps.set-env.outputs.DPCFLAG == '' }} - run: | - Start-Process msiexec -ArgumentList "/i opencl_rt.msi /qn" -Wait - echo "Installed Intel OpenCL CPU Runtime" - - name: Install dependencies - shell: cmd - run: | - python -m venv venv - call .\venv\Scripts\activate.bat - pip install --upgrade setuptools - pip install cpufeature clang-format pyyaml - pip install -r dependencies-dev - - name: System info - shell: cmd - run: | - call .\venv\Scripts\activate.bat - call .\oneapi\setvars.bat - bash .ci/scripts/describe_system.sh - - name: Build daal4py/sklearnex - shell: cmd - run: | - call .\venv\Scripts\activate.bat - call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - set PREFIX=. - set PYTHON=python - call .\conda-recipe\bld.bat - - name: Install testing requirements - shell: cmd - run: | - call .\venv\Scripts\activate.bat - call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - bash .ci/scripts/setup_sklearn.sh ${{ matrix.SKLEARN_VERSION }} - pip install --upgrade -r requirements-test.txt - for /f "delims=" %%c in ('python .ci\scripts\get_compatible_scipy_version.py ${{ matrix.SKLEARN_VERSION }}') do set SCIPY_VERSION=%%c - pip install %SCIPY_VERSION% - if "${{ steps.set-env.outputs.DPCFLAG }}"=="" pip install dpctl==${{ env.DPCTL_VERSION }} dpnp==${{ env.DPNP_VERSION }} - pip list - - name: Sklearnex testing - shell: cmd - run: | - call .\venv\Scripts\activate.bat - call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - set PYTHON=python - set COVERAGE_FILE=%cd%\.coverage.sklearnex - cd .. - call scikit-learn-intelex\conda-recipe\run_test.bat scikit-learn-intelex\ - - name: Sklearn testing - shell: cmd - run: | - call .\venv\Scripts\activate.bat - call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - set COVERAGE_FILE=%cd%\.coverage.sklearn - if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu - bash .ci/scripts/run_sklearn_tests.sh %CPU% - - name: Archive coverage data - uses: actions/upload-artifact@v4 - with: - name: coverage_win_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - path: | - .coverage.sklearn - .coverage.sklearnex - include-hidden-files: true - - name: Sklearn testing [preview] - shell: cmd - run: | - call .\venv\Scripts\activate.bat - call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu - set SKLEARNEX_PREVIEW=YES - bash .ci/scripts/run_sklearn_tests.sh %CPU% From 8abc8313b57962b56748bc5925ae7e6dc0ec035e Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 13:02:03 +0100 Subject: [PATCH 06/57] Update codecov.yml --- .github/workflows/codecov.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c7db85a8d9..80c52a72e4 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -34,14 +34,9 @@ jobs: - name: Install Python uses: actions/setup-python@v5 - name: 'Download artifact' - uses: actions/github-script@v6 + uses: actions/download-artifact@v4 with: - script: | - let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: context.payload.workflow_run.id, - }); + run_id: ${{ github.event.workflow_run.id }} - name: Upload coverage reports to Codecov run: | ls -lha From 3ef0e896a3082b718e7fd3f951608078ea6d1a1b Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 13:28:14 +0100 Subject: [PATCH 07/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 80c52a72e4..598c8b93aa 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -36,7 +36,7 @@ jobs: - name: 'Download artifact' uses: actions/download-artifact@v4 with: - run_id: ${{ github.event.workflow_run.id }} + run-id: ${{ github.event.workflow_run.id }} - name: Upload coverage reports to Codecov run: | ls -lha From a66e6e5348ad260409cefd9d57b140fa94a6f28b Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 13:55:27 +0100 Subject: [PATCH 08/57] Create test.yml --- .github/workflows/test.yml | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..059b9f39e7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,66 @@ +#=============================================================================== +# Copyright 2024 Intel Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#=============================================================================== + +name: test +on: + pull_request: + branches: [ "main" ] + push: + branches: + - main + workflow_dispatch: + +permissions: read-all + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref_name }}-${{ github.event.number || github.sha }} + cancel-in-progress: true + +env: + DPCTL_VERSION: 0.18.1 + DPNP_VERSION: 0.16.0 + DPCTL_PY_VERSIONS: '3.9\|3.11' + +jobs: + sklearn_lnx: + strategy: + fail-fast: false + matrix: + include: + - PYTHON_VERSION: "3.10" + SKLEARN_VERSION: "1.2" + name: LinuxNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }} + runs-on: ubuntu-24.04 + timeout-minutes: 120 + + steps: + - name: Checkout Scikit-learn-intelex + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.PYTHON_VERSION }} + - name: Get run ID of "CI" workflow + id: get-run-id + run: | + OTHER_REPO="icfaust/scikit-learn-intelex" + WF_NAME="CI" + JQ_QUERY='map(select(.event == "workflow_dispatch" or .event == "schedule")) | .[0].databaseId' + RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` + echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" + echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ github.token }} From d949488e8a58f7e124a6ae813838d0261243345d Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:00:58 +0100 Subject: [PATCH 09/57] Update test.yml --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 059b9f39e7..045ec9bf2d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,3 +64,8 @@ jobs: echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" env: GH_TOKEN: ${{ github.token }} + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + # github-token: ${{ github.token }} + run-id: ${{ steps.get-run-id.outputs.run-id }} From b8c430bde547996b3b99214df6555e2a76250ab4 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:02:08 +0100 Subject: [PATCH 10/57] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 045ec9bf2d..cb57f3a012 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,5 +67,5 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: - # github-token: ${{ github.token }} + github-token: ${{ github.token }} run-id: ${{ steps.get-run-id.outputs.run-id }} From 98b9cbf910cf051561a8c7686b20fc08ff8aa059 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:03:00 +0100 Subject: [PATCH 11/57] Update codecov.yml --- .github/workflows/codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 598c8b93aa..97c76a5668 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -36,6 +36,7 @@ jobs: - name: 'Download artifact' uses: actions/download-artifact@v4 with: + github-token: ${{ github.token }} run-id: ${{ github.event.workflow_run.id }} - name: Upload coverage reports to Codecov run: | From 007a144eba6486aa490e28d43dd43d50a4f40d09 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:06:30 +0100 Subject: [PATCH 12/57] Update test.yml --- .github/workflows/test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cb57f3a012..b2003cbb1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,5 +67,12 @@ jobs: - name: Download artifacts uses: actions/download-artifact@v4 with: + path: coverage github-token: ${{ github.token }} run-id: ${{ steps.get-run-id.outputs.run-id }} + - name: Upload coverage reports to Codecov + run: | + ls -lha + python -m pip install coverage codecov-cli + coverage combine ./coverage + coverage xml From 3bf647a470c294c56cbae8b14d8e47c28316feed Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:07:00 +0100 Subject: [PATCH 13/57] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b2003cbb1b..60de449996 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,7 +71,7 @@ jobs: github-token: ${{ github.token }} run-id: ${{ steps.get-run-id.outputs.run-id }} - name: Upload coverage reports to Codecov - run: | + run: | ls -lha python -m pip install coverage codecov-cli coverage combine ./coverage From 5f98478dc2cbcf1d7a60c0474a40f554fcffd744 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:10:15 +0100 Subject: [PATCH 14/57] Update test.yml --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 60de449996..ee666c09ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,6 +73,7 @@ jobs: - name: Upload coverage reports to Codecov run: | ls -lha + ls -lha coverage python -m pip install coverage codecov-cli coverage combine ./coverage coverage xml From 12d836be3559f3a90d5bdbca35b2c5c5205b5137 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:19:32 +0100 Subject: [PATCH 15/57] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ee666c09ab..0d211a5d3e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,5 +75,5 @@ jobs: ls -lha ls -lha coverage python -m pip install coverage codecov-cli - coverage combine ./coverage + find ./coverage -print0 | xargs -0 coverage combine coverage xml From ba679174a41463e3fb8b49b71a1be7e9a514bae5 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:29:41 +0100 Subject: [PATCH 16/57] Update ci.yml --- .github/workflows/ci.yml | 156 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 152 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 239be3cfab..65f2947791 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,8 +40,12 @@ jobs: fail-fast: false matrix: include: + - PYTHON_VERSION: "3.9" + SKLEARN_VERSION: "1.1" - PYTHON_VERSION: "3.10" SKLEARN_VERSION: "1.2" + - PYTHON_VERSION: "3.11" + SKLEARN_VERSION: "1.3" name: LinuxNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }} runs-on: ubuntu-24.04 timeout-minutes: 120 @@ -125,14 +129,14 @@ jobs: run: | source venv/bin/activate source .github/scripts/activate_components.sh - export COVERAGE_FILE=$(pwd)/.coverage.sklearnex + export COVERAGE_FILE=$(pwd)/.coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} cd .ci ../conda-recipe/run_test.sh - name: Sklearn testing run: | source venv/bin/activate source .github/scripts/activate_components.sh - export COVERAGE_FILE=$(pwd)/.coverage.sklearn + export COVERAGE_FILE=$(pwd)/.coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} if [ "${{ steps.set-env.outputs.DPCFLAG }}" == "" ]; then export CPU=cpu; fi bash .ci/scripts/run_sklearn_tests.sh $CPU - name: Archive coverage data @@ -140,8 +144,8 @@ jobs: with: name: coverage_lnx_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} path: | - .coverage.sklearn - .coverage.sklearnex + .coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + .coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} include-hidden-files: true - name: Sklearn testing [preview] run: | @@ -150,3 +154,147 @@ jobs: if [ "${{ steps.set-env.outputs.DPCFLAG }}" == "" ]; then export CPU=cpu; fi export SKLEARNEX_PREVIEW='YES' bash .ci/scripts/run_sklearn_tests.sh $CPU + + sklearn_win: + strategy: + fail-fast: false + matrix: + include: + - PYTHON_VERSION: "3.9" + SKLEARN_VERSION: "1.1" + - PYTHON_VERSION: "3.10" + SKLEARN_VERSION: "1.2" + - PYTHON_VERSION: "3.11" + SKLEARN_VERSION: "1.3" + name: WindowsNightly/pip Python${{ matrix.PYTHON_VERSION }}_Sklearn${{ matrix.SKLEARN_VERSION }} + runs-on: windows-2022 + timeout-minutes: 120 + + steps: + - name: Checkout Scikit-learn-intelex + uses: actions/checkout@v4 + - name: Install Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.PYTHON_VERSION }} + - name: Get run ID of "Nightly-build" workflow + id: get-run-id + shell: bash + run: | + OTHER_REPO="uxlfoundation/oneDAL" + WF_NAME="Nightly-build" + JQ_QUERY='map(select(.event == "workflow_dispatch" or .event == "schedule")) | .[0].databaseId' + RUN_ID=`gh run --repo ${OTHER_REPO} list --workflow "${WF_NAME}" --json databaseId,event --status success --jq "${JQ_QUERY}"` + echo "Detected latest run id of ${RUN_ID} for workflow ${WF_NAME}" + echo "run-id=${RUN_ID}" >> "$GITHUB_OUTPUT" + env: + GH_TOKEN: ${{ github.token }} + - name: Download oneDAL build artifact + uses: actions/download-artifact@v4 + with: + name: __release_win + github-token: ${{ github.token }} + repository: uxlfoundation/oneDAL + run-id: ${{ steps.get-run-id.outputs.run-id }} + path: ./__release_win + - name: Download Intel BaseKit artifact + uses: actions/download-artifact@v4 + with: + name: intel_oneapi_basekit + github-token: ${{ github.token }} + repository: uxlfoundation/oneDAL + run-id: ${{ steps.get-run-id.outputs.run-id }} + - name: Decompress Intel BaseKit + shell: cmd + run: | + tar -xvzf oneapi.tar.gz + echo "Unzip complete" + - name: Set Environment Variables + id: set-env + shell: cmd + run: | + echo C:\msys64\usr\bin;>> %GITHUB_PATH% + echo NO_DIST=YES>> %GITHUB_ENV% + set DPCTL_TEMP="${{ env.DPCTL_PY_VERSIONS }}" + if not %DPCTL_TEMP:${{ matrix.PYTHON_VERSION }}=%==%DPCTL_TEMP% (echo DPCFLAG=>> %GITHUB_OUTPUT%) else (echo DPCFLAG="0">> %GITHUB_OUTPUT%) + echo COVERAGE_RCFILE=%cd%\.coveragerc>> %GITHUB_ENV% + - name: Download Intel OpenCL CPU Runtime artifact + if: ${{ steps.set-env.outputs.DPCFLAG == '' }} + uses: actions/download-artifact@v4 + with: + name: opencl_rt_installer + github-token: ${{ github.token }} + repository: uxlfoundation/oneDAL + run-id: ${{ steps.get-run-id.outputs.run-id }} + path: . + - name: Install Intel OpenCL CPU Runtime + if: ${{ steps.set-env.outputs.DPCFLAG == '' }} + run: | + Start-Process msiexec -ArgumentList "/i opencl_rt.msi /qn" -Wait + echo "Installed Intel OpenCL CPU Runtime" + - name: Install dependencies + shell: cmd + run: | + python -m venv venv + call .\venv\Scripts\activate.bat + pip install --upgrade setuptools + pip install cpufeature clang-format pyyaml + pip install -r dependencies-dev + - name: System info + shell: cmd + run: | + call .\venv\Scripts\activate.bat + call .\oneapi\setvars.bat + bash .ci/scripts/describe_system.sh + - name: Build daal4py/sklearnex + shell: cmd + run: | + call .\venv\Scripts\activate.bat + call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} + set PREFIX=. + set PYTHON=python + call .\conda-recipe\bld.bat + - name: Install testing requirements + shell: cmd + run: | + call .\venv\Scripts\activate.bat + call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} + bash .ci/scripts/setup_sklearn.sh ${{ matrix.SKLEARN_VERSION }} + pip install --upgrade -r requirements-test.txt + for /f "delims=" %%c in ('python .ci\scripts\get_compatible_scipy_version.py ${{ matrix.SKLEARN_VERSION }}') do set SCIPY_VERSION=%%c + pip install %SCIPY_VERSION% + if "${{ steps.set-env.outputs.DPCFLAG }}"=="" pip install dpctl==${{ env.DPCTL_VERSION }} dpnp==${{ env.DPNP_VERSION }} + pip list + - name: Sklearnex testing + shell: cmd + run: | + call .\venv\Scripts\activate.bat + call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} + set PYTHON=python + set COVERAGE_FILE=%cd%\.coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + cd .. + call scikit-learn-intelex\conda-recipe\run_test.bat scikit-learn-intelex\ + - name: Sklearn testing + shell: cmd + run: | + call .\venv\Scripts\activate.bat + call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} + set COVERAGE_FILE=%cd%\.coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu + bash .ci/scripts/run_sklearn_tests.sh %CPU% + - name: Archive coverage data + uses: actions/upload-artifact@v4 + with: + name: coverage_win_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + path: | + .coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + .coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + include-hidden-files: true + - name: Sklearn testing [preview] + shell: cmd + run: | + call .\venv\Scripts\activate.bat + call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} + if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu + set SKLEARNEX_PREVIEW=YES + bash .ci/scripts/run_sklearn_tests.sh %CPU% From 58cfbd80d035d4206a1f38a97724323ab8cede12 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:31:07 +0100 Subject: [PATCH 17/57] Update test.yml --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0d211a5d3e..988ab9700c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,10 +70,11 @@ jobs: path: coverage github-token: ${{ github.token }} run-id: ${{ steps.get-run-id.outputs.run-id }} + merge-multiple: true - name: Upload coverage reports to Codecov run: | ls -lha ls -lha coverage python -m pip install coverage codecov-cli - find ./coverage -print0 | xargs -0 coverage combine + coverage combine ./coverage coverage xml From 99cb4d4c37c3034bfec8be59234f90acd810ac8d Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:36:06 +0100 Subject: [PATCH 18/57] Update test.yml --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 988ab9700c..3100e2672d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -71,10 +71,10 @@ jobs: github-token: ${{ github.token }} run-id: ${{ steps.get-run-id.outputs.run-id }} merge-multiple: true - - name: Upload coverage reports to Codecov + - name: Install dependencies run: | - ls -lha - ls -lha coverage python -m pip install coverage codecov-cli + - name: Combine, convert and upload coverage combine ./coverage coverage xml + ls -lha From 7607c6361252c18bad87f80195da94e1148ca40f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:36:58 +0100 Subject: [PATCH 19/57] Update test.yml --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3100e2672d..fc150dadfd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -75,6 +75,7 @@ jobs: run: | python -m pip install coverage codecov-cli - name: Combine, convert and upload + run: | coverage combine ./coverage coverage xml ls -lha From 47e4ed39bdc66719cb41aaa5f70d5f3507f9ceb1 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 14:56:21 +0100 Subject: [PATCH 20/57] Update test.yml --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc150dadfd..1a34267d42 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -73,9 +73,12 @@ jobs: merge-multiple: true - name: Install dependencies run: | - python -m pip install coverage codecov-cli + python -m pip install coverage + curl -Os https://cli.codecov.io/latest/linux/codecov + chmod +x codecov - name: Combine, convert and upload run: | coverage combine ./coverage coverage xml + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage.xml ls -lha From 3b66f637261cca229eb19048a4ccc22219349e89 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 15:17:43 +0100 Subject: [PATCH 21/57] Update ci.yml --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65f2947791..a46efccdeb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,14 +129,14 @@ jobs: run: | source venv/bin/activate source .github/scripts/activate_components.sh - export COVERAGE_FILE=$(pwd)/.coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + export COVERAGE_FILE=$(pwd)/.coverage.lnx.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} cd .ci ../conda-recipe/run_test.sh - name: Sklearn testing run: | source venv/bin/activate source .github/scripts/activate_components.sh - export COVERAGE_FILE=$(pwd)/.coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + export COVERAGE_FILE=$(pwd)/.coverage.lnx.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} if [ "${{ steps.set-env.outputs.DPCFLAG }}" == "" ]; then export CPU=cpu; fi bash .ci/scripts/run_sklearn_tests.sh $CPU - name: Archive coverage data @@ -144,8 +144,8 @@ jobs: with: name: coverage_lnx_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} path: | - .coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - .coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + .coverage.lnx.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + .coverage.lnx.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} include-hidden-files: true - name: Sklearn testing [preview] run: | @@ -271,7 +271,7 @@ jobs: call .\venv\Scripts\activate.bat call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} set PYTHON=python - set COVERAGE_FILE=%cd%\.coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + set COVERAGE_FILE=%cd%\.coverage.win.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} cd .. call scikit-learn-intelex\conda-recipe\run_test.bat scikit-learn-intelex\ - name: Sklearn testing @@ -279,7 +279,7 @@ jobs: run: | call .\venv\Scripts\activate.bat call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - set COVERAGE_FILE=%cd%\.coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + set COVERAGE_FILE=%cd%\.coverage.win.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu bash .ci/scripts/run_sklearn_tests.sh %CPU% - name: Archive coverage data @@ -287,8 +287,8 @@ jobs: with: name: coverage_win_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} path: | - .coverage.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - .coverage.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + .coverage.win.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + .coverage.win.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} include-hidden-files: true - name: Sklearn testing [preview] shell: cmd From a0f6df2bfd083aa9705e128df8d5ad26e7beb719 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 15:19:36 +0100 Subject: [PATCH 22/57] Update codecov.yml --- .github/workflows/codecov.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 97c76a5668..0ad2680752 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -28,7 +28,7 @@ concurrency: jobs: upload_coverage: runs-on: ubuntu-24.04 - # if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' }} name: Codecov steps: - name: Install Python @@ -38,9 +38,14 @@ jobs: with: github-token: ${{ github.token }} run-id: ${{ github.event.workflow_run.id }} - - name: Upload coverage reports to Codecov + merge-multiple: true + - name: Install dependencies run: | - ls -lha - python -m pip install coverage codecov-cli - coverage combine - codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service + python -m pip install coverage + curl -Os https://cli.codecov.io/latest/linux/codecov + chmod +x codecov + - name: Combine, convert and upload + run: | + coverage combine ./coverage + coverage xml + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage.xml From f28895235aac175dcc15a5af8d10eda76d1f0fc9 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 16:00:25 +0100 Subject: [PATCH 23/57] Update codecov.yml --- .github/workflows/codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 0ad2680752..0c390b8d67 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -36,6 +36,7 @@ jobs: - name: 'Download artifact' uses: actions/download-artifact@v4 with: + path: coverage github-token: ${{ github.token }} run-id: ${{ github.event.workflow_run.id }} merge-multiple: true From b057bf17479d53efe65ea69a23045c64105be72f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 16:07:42 +0100 Subject: [PATCH 24/57] Update codecov.yml --- .github/workflows/codecov.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 0c390b8d67..e1569c750c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. #=============================================================================== -name: Codecov +name: codecov on: workflow_run: workflows: [CI] @@ -45,8 +45,11 @@ jobs: python -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - - name: Combine, convert and upload + - name: Generate coverage.py report run: | coverage combine ./coverage coverage xml - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage.xml + - name: Upload to codecov + run: | + export CODECOV_NAME='service'-${{ github.event.number }}-${{ github.sha }} + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -F service -f coverage.xml From 791075a6b21f5a6096b9d49782846c253d39f25e Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 16:08:22 +0100 Subject: [PATCH 25/57] Update test.yml --- .github/workflows/test.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a34267d42..a890a4a0c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,9 +76,11 @@ jobs: python -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - - name: Combine, convert and upload + - name: Generate coverage.py report run: | coverage combine ./coverage coverage xml - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n 'service'-${{ github.run_id }} -F service -f coverage.xml - ls -lha + - name: Upload to codecov + run: | + export CODECOV_NAME='service'-${{ github.event.number }}-${{ github.sha }} + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -F service -f coverage.xml From 441f5cdcecb38f490ca874794b5329c52bae39a2 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 16:14:33 +0100 Subject: [PATCH 26/57] Update test.yml --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a890a4a0c6..9d86d5a326 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,5 +82,5 @@ jobs: coverage xml - name: Upload to codecov run: | - export CODECOV_NAME='service'-${{ github.event.number }}-${{ github.sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -F service -f coverage.xml + export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -f coverage.xml From ebf04c87e5e567fce8cea07f5153c59cac0558cd Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 16:15:03 +0100 Subject: [PATCH 27/57] Update codecov.yml --- .github/workflows/codecov.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e1569c750c..ae644a54a9 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -51,5 +51,5 @@ jobs: coverage xml - name: Upload to codecov run: | - export CODECOV_NAME='service'-${{ github.event.number }}-${{ github.sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -F service -f coverage.xml + export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -f coverage.xml From b80b2ba92f94fd32cabc0c0e6f7ac07a31b5de83 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 17:43:36 +0100 Subject: [PATCH 28/57] Update ci.yml --- .github/workflows/ci.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a46efccdeb..1246540984 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -129,24 +129,24 @@ jobs: run: | source venv/bin/activate source .github/scripts/activate_components.sh - export COVERAGE_FILE=$(pwd)/.coverage.lnx.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + export COVERAGE_FILE=$(pwd)/.coverage.sklearnex cd .ci ../conda-recipe/run_test.sh - name: Sklearn testing run: | source venv/bin/activate source .github/scripts/activate_components.sh - export COVERAGE_FILE=$(pwd)/.coverage.lnx.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + export COVERAGE_FILE=$(pwd)/.coverage.sklearn if [ "${{ steps.set-env.outputs.DPCFLAG }}" == "" ]; then export CPU=cpu; fi bash .ci/scripts/run_sklearn_tests.sh $CPU - - name: Archive coverage data + - name: Create coverage report + run: | + coverage combine .coverage.sklearnex .coverage.sklearn + coverage xml -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + - name: Archive coverage report uses: actions/upload-artifact@v4 with: - name: coverage_lnx_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - path: | - .coverage.lnx.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - .coverage.lnx.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - include-hidden-files: true + path: coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Sklearn testing [preview] run: | source venv/bin/activate @@ -271,7 +271,7 @@ jobs: call .\venv\Scripts\activate.bat call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} set PYTHON=python - set COVERAGE_FILE=%cd%\.coverage.win.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + set COVERAGE_FILE=%cd%\.coverage.sklearnex cd .. call scikit-learn-intelex\conda-recipe\run_test.bat scikit-learn-intelex\ - name: Sklearn testing @@ -279,17 +279,18 @@ jobs: run: | call .\venv\Scripts\activate.bat call .\.github\scripts\activate_components.bat ${{ steps.set-env.outputs.DPCFLAG }} - set COVERAGE_FILE=%cd%\.coverage.win.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} + set COVERAGE_FILE=%cd%\.coverage.sklearn if "${{ steps.set-env.outputs.DPCFLAG }}"=="" set CPU=cpu bash .ci/scripts/run_sklearn_tests.sh %CPU% - - name: Archive coverage data + - name: Create coverage report + shell: cmd + run: | + coverage combine .coverage.sklearnex .coverage.sklearn + coverage xml -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + - name: Archive coverage report uses: actions/upload-artifact@v4 with: - name: coverage_win_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - path: | - .coverage.win.sklearn_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - .coverage.win.sklearnex_${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - include-hidden-files: true + path: coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Sklearn testing [preview] shell: cmd run: | From 16a6efdf84aa4898bfed8dd3d06b0af36dda6c29 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 17:44:51 +0100 Subject: [PATCH 29/57] Update test.yml --- .github/workflows/test.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d86d5a326..69cf0a9de3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -76,11 +76,7 @@ jobs: python -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - - name: Generate coverage.py report - run: | - coverage combine ./coverage - coverage xml - name: Upload to codecov run: | export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -f coverage.xml + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -s ./coverage From 9dbf4513c833cf65ecd06393e6fedb79a9b65e4f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 18:18:02 +0100 Subject: [PATCH 30/57] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1246540984..60e17b0620 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,8 +141,8 @@ jobs: bash .ci/scripts/run_sklearn_tests.sh $CPU - name: Create coverage report run: | - coverage combine .coverage.sklearnex .coverage.sklearn - coverage xml -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + python -m coverage combine .coverage.sklearnex .coverage.sklearn + python -m coverage xml -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Archive coverage report uses: actions/upload-artifact@v4 with: @@ -285,8 +285,8 @@ jobs: - name: Create coverage report shell: cmd run: | - coverage combine .coverage.sklearnex .coverage.sklearn - coverage xml -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + python -m coverage combine .coverage.sklearnex .coverage.sklearn + python -m coverage xml -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Archive coverage report uses: actions/upload-artifact@v4 with: From dc474d64da95fcb5604c2f16ae8a63d65d918efa Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 18:46:08 +0100 Subject: [PATCH 31/57] Update ci.yml --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 60e17b0620..4d78777bfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,8 +141,9 @@ jobs: bash .ci/scripts/run_sklearn_tests.sh $CPU - name: Create coverage report run: | - python -m coverage combine .coverage.sklearnex .coverage.sklearn - python -m coverage xml -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + source venv/bin/activate + coverage combine .coverage.sklearnex .coverage.sklearn + coverage xml -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Archive coverage report uses: actions/upload-artifact@v4 with: @@ -285,8 +286,9 @@ jobs: - name: Create coverage report shell: cmd run: | - python -m coverage combine .coverage.sklearnex .coverage.sklearn - python -m coverage xml -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + call .\venv\Scripts\activate.bat + coverage combine .coverage.sklearnex .coverage.sklearn + coverage xml -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Archive coverage report uses: actions/upload-artifact@v4 with: From 77b609d2e54637c95132840ce9d0b55dcba7e5bd Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 19:32:37 +0100 Subject: [PATCH 32/57] Update ci.yml --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d78777bfd..078398976d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,6 +147,7 @@ jobs: - name: Archive coverage report uses: actions/upload-artifact@v4 with: + name: coverage_lnx_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} path: coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Sklearn testing [preview] run: | @@ -292,6 +293,7 @@ jobs: - name: Archive coverage report uses: actions/upload-artifact@v4 with: + name: coverage_win_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} path: coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml - name: Sklearn testing [preview] shell: cmd From d244f32cae3a90570e4efcffbf228aa60d2e85d0 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 21:01:05 +0100 Subject: [PATCH 33/57] Update codecov.yml --- .github/workflows/codecov.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index ae644a54a9..bc08dd244d 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -45,11 +45,7 @@ jobs: python -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - - name: Generate coverage.py report - run: | - coverage combine ./coverage - coverage xml - name: Upload to codecov run: | export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -f coverage.xml + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -s ./coverage From 3dc9cf56b32a2f0c39acd34cc1046fae9616017e Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 21:05:08 +0100 Subject: [PATCH 34/57] Update test.yml --- .github/workflows/test.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 69cf0a9de3..efc8c7abe8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,11 +16,6 @@ name: test on: - pull_request: - branches: [ "main" ] - push: - branches: - - main workflow_dispatch: permissions: read-all @@ -73,7 +68,6 @@ jobs: merge-multiple: true - name: Install dependencies run: | - python -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - name: Upload to codecov From 28f16646bc4134a23099b78b8ada315154ce7608 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 21:05:42 +0100 Subject: [PATCH 35/57] Update codecov.yml --- .github/workflows/codecov.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index bc08dd244d..31a90ac2b3 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -40,9 +40,8 @@ jobs: github-token: ${{ github.token }} run-id: ${{ github.event.workflow_run.id }} merge-multiple: true - - name: Install dependencies + - name: Install codecov cli run: | - python -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - name: Upload to codecov From 6f83753c2ee330d938cfb89168b0e75a9bd4b194 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 22:04:20 +0100 Subject: [PATCH 36/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 31a90ac2b3..e94d28ebba 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -31,8 +31,6 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} name: Codecov steps: - - name: Install Python - uses: actions/setup-python@v5 - name: 'Download artifact' uses: actions/download-artifact@v4 with: From a1e8d0454f17310297b11dd96d27605cf6143edc Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 22:05:33 +0100 Subject: [PATCH 37/57] Update test.yml --- .github/workflows/test.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index efc8c7abe8..52cb4d6dc3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,10 +44,6 @@ jobs: steps: - name: Checkout Scikit-learn-intelex uses: actions/checkout@v4 - - name: Install Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.PYTHON_VERSION }} - name: Get run ID of "CI" workflow id: get-run-id run: | From 1da83234bb6c8fee46bc6a8b397a9194b1c06178 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 22:19:50 +0100 Subject: [PATCH 38/57] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 078398976d..2050891b00 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ name: CI on: pull_request: - branches: [ "main" ] + branches: [ "master" ] push: branches: - main From 5fbf1872513d69a0d871b159705b9127619a30eb Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 22:32:24 +0100 Subject: [PATCH 39/57] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2050891b00..2493a51a50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ on: branches: [ "master" ] push: branches: - - main + - master workflow_dispatch: permissions: read-all From bb7b2086fd8cb6b531e16f8976170d6b0966bcc8 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Wed, 11 Dec 2024 23:22:35 +0100 Subject: [PATCH 40/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index e94d28ebba..320d88228f 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -31,6 +31,8 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} name: Codecov steps: + - name: Checkout Scikit-learn-intelex + uses: actions/checkout@v4 - name: 'Download artifact' uses: actions/download-artifact@v4 with: From 7c36b21beaf02e7fa740a505728f4e6f49083802 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 01:02:59 +0100 Subject: [PATCH 41/57] Update codecov.yml --- .github/workflows/codecov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 320d88228f..1a2cc2fdf9 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -47,4 +47,5 @@ jobs: - name: Upload to codecov run: | export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n "${CODECOV_NAME}" -F github -s ./coverage + export SHA=${{ github.event.workflow_run.head_sha }} + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -C $SHA -F github -s ./coverage From 0dfd4f0872f7b2a6ed094f20d44278252c9202c0 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 07:19:27 +0100 Subject: [PATCH 42/57] Update codecov.yml --- .github/workflows/codecov.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 1a2cc2fdf9..1fad789a18 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,6 +46,11 @@ jobs: chmod +x codecov - name: Upload to codecov run: | + export PR=$("$GITHUB_REF | awk -F / '{print $3}') + echo $PR + if [ -n "${PR}" ]; then export PR="-P ${PR}"; fi + echo here + echo $PR export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} export SHA=${{ github.event.workflow_run.head_sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -C $SHA -F github -s ./coverage + ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -C $SHA -F github -s ./coverage $PR From 59484bc50e84b4e56d6a039d0abfce4ddd43e6c3 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 07:22:43 +0100 Subject: [PATCH 43/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 1fad789a18..c1999f287f 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,7 +46,7 @@ jobs: chmod +x codecov - name: Upload to codecov run: | - export PR=$("$GITHUB_REF | awk -F / '{print $3}') + export PR=$("$GITHUB_REF" | awk -F / '{print $3}') echo $PR if [ -n "${PR}" ]; then export PR="-P ${PR}"; fi echo here From ab6d33e356c7d1efa20f9cccf49224ba6b34ba8b Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 08:56:27 +0100 Subject: [PATCH 44/57] Update codecov.yml --- .github/workflows/codecov.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c1999f287f..0ab8cebec0 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,8 +46,11 @@ jobs: chmod +x codecov - name: Upload to codecov run: | - export PR=$("$GITHUB_REF" | awk -F / '{print $3}') + export PR=${{ github.event.workflow_run.pull_requests[0].number }} + echo ${{ github.event.workflow_run.triggering_actor.url }} + PR2=`gh pr view ${{ github.event.workflow_run.head_branch }} --json number -q .number` echo $PR + echo $PR2 if [ -n "${PR}" ]; then export PR="-P ${PR}"; fi echo here echo $PR From cb3e89f5caa473b11fd2f33e951e89125a054668 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 10:25:47 +0100 Subject: [PATCH 45/57] Update codecov.yml --- .github/workflows/codecov.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 0ab8cebec0..96fec89bb5 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -42,18 +42,14 @@ jobs: merge-multiple: true - name: Install codecov cli run: | + python3 -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - name: Upload to codecov run: | export PR=${{ github.event.workflow_run.pull_requests[0].number }} - echo ${{ github.event.workflow_run.triggering_actor.url }} - PR2=`gh pr view ${{ github.event.workflow_run.head_branch }} --json number -q .number` echo $PR - echo $PR2 + export CODECOV_NAME=CI-$PR-${{ github.sha }} if [ -n "${PR}" ]; then export PR="-P ${PR}"; fi - echo here - echo $PR - export CODECOV_NAME=CI-${{ github.event.number }}-${{ github.sha }} export SHA=${{ github.event.workflow_run.head_sha }} - ./codecov --verbose upload-process --fail-on-error -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -C $SHA -F github -s ./coverage $PR + ./codecov -v upload-process -Z -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -C $SHA -F github -s ./coverage $PR From 47a7bb5d455a828642ef852436c2bcffd75008d6 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 11:11:34 +0100 Subject: [PATCH 46/57] Update ci.yml --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2493a51a50..881c8e8e27 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,12 +143,12 @@ jobs: run: | source venv/bin/activate coverage combine .coverage.sklearnex .coverage.sklearn - coverage xml -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + coverage json -o coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.json - name: Archive coverage report uses: actions/upload-artifact@v4 with: name: coverage_lnx_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - path: coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + path: coverage.lnx${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.json - name: Sklearn testing [preview] run: | source venv/bin/activate @@ -289,12 +289,12 @@ jobs: run: | call .\venv\Scripts\activate.bat coverage combine .coverage.sklearnex .coverage.sklearn - coverage xml -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + coverage json -o coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.json - name: Archive coverage report uses: actions/upload-artifact@v4 with: name: coverage_win_Py${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }} - path: coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.xml + path: coverage.win${{ matrix.PYTHON_VERSION }}_${{ matrix.SKLEARN_VERSION }}.json - name: Sklearn testing [preview] shell: cmd run: | From fb564c3846250c58ee47e4c6ee2d178092535243 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 11:11:54 +0100 Subject: [PATCH 47/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 96fec89bb5..bb43458590 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -42,13 +42,11 @@ jobs: merge-multiple: true - name: Install codecov cli run: | - python3 -m pip install coverage curl -Os https://cli.codecov.io/latest/linux/codecov chmod +x codecov - name: Upload to codecov run: | export PR=${{ github.event.workflow_run.pull_requests[0].number }} - echo $PR export CODECOV_NAME=CI-$PR-${{ github.sha }} if [ -n "${PR}" ]; then export PR="-P ${PR}"; fi export SHA=${{ github.event.workflow_run.head_sha }} From 54d43d4734bde993fec4077069bd8dfd8f0dd67f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 12:04:36 +0100 Subject: [PATCH 48/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index bb43458590..2ed6171dd3 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -28,7 +28,7 @@ concurrency: jobs: upload_coverage: runs-on: ubuntu-24.04 - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.repository == 'icfaust/scikit-learn-intelex' && github.event.workflow_run.conclusion == 'success' }} name: Codecov steps: - name: Checkout Scikit-learn-intelex From 69d27e7e7357cc690ffeca295b6d8a387db55a45 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 13:21:48 +0100 Subject: [PATCH 49/57] Update codecov.yml --- .github/workflows/codecov.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2ed6171dd3..c1978ca502 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -47,7 +47,8 @@ jobs: - name: Upload to codecov run: | export PR=${{ github.event.workflow_run.pull_requests[0].number }} - export CODECOV_NAME=CI-$PR-${{ github.sha }} - if [ -n "${PR}" ]; then export PR="-P ${PR}"; fi export SHA=${{ github.event.workflow_run.head_sha }} - ./codecov -v upload-process -Z -t ${{ secrets.CODECOV_TOKEN }} -n $CODECOV_NAME -C $SHA -F github -s ./coverage $PR + export VARARGS="-n github" + # if a PR, pass proper information to codecov-cli about SHA, PR number + if [ -n "${PR}" ] then export VARARGS="${VARARGS}-${PR}-${SHA} -P ${PR} -C ${SHA}" + ./codecov -v upload-process -Z -t ${{ secrets.CODECOV_TOKEN }} $VARARGS -F github -s ./coverage From 9f22b06f8fe7a222cb5f1d1b05e400fe849bb210 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 14:03:03 +0100 Subject: [PATCH 50/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index c1978ca502..4d61a3b95b 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -50,5 +50,5 @@ jobs: export SHA=${{ github.event.workflow_run.head_sha }} export VARARGS="-n github" # if a PR, pass proper information to codecov-cli about SHA, PR number - if [ -n "${PR}" ] then export VARARGS="${VARARGS}-${PR}-${SHA} -P ${PR} -C ${SHA}" + if [ -n "${PR}" ]; then export VARARGS="${VARARGS}-${PR}-${SHA} -P ${PR} -C ${SHA}"; fi ./codecov -v upload-process -Z -t ${{ secrets.CODECOV_TOKEN }} $VARARGS -F github -s ./coverage From c37d31fc1457017819425b5e1fbef22d4f015ece Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 17:12:24 +0100 Subject: [PATCH 51/57] Update codecov.yml --- .github/workflows/codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 4d61a3b95b..3232fc1088 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,6 +46,7 @@ jobs: chmod +x codecov - name: Upload to codecov run: | + echo $GITHUB_REF export PR=${{ github.event.workflow_run.pull_requests[0].number }} export SHA=${{ github.event.workflow_run.head_sha }} export VARARGS="-n github" From beb7b55e7e0c00d4fab9c35f7991ed7de4614f5f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 17:57:59 +0100 Subject: [PATCH 52/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 3232fc1088..8da3987556 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,7 +46,7 @@ jobs: chmod +x codecov - name: Upload to codecov run: | - echo $GITHUB_REF + echo ${{ github.event.workflow_run.head_branch }} export PR=${{ github.event.workflow_run.pull_requests[0].number }} export SHA=${{ github.event.workflow_run.head_sha }} export VARARGS="-n github" From 7950775da2b8234b73f4337c9398095f6a3a16a2 Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 18:49:34 +0100 Subject: [PATCH 53/57] Update codecov.yml --- .github/workflows/codecov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 8da3987556..db32646d62 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,7 +46,8 @@ jobs: chmod +x codecov - name: Upload to codecov run: | - echo ${{ github.event.workflow_run.head_branch }} + PR2=`gh pr view ${{ github.event.workflow_run.head_branch }} --json number -q .number` + echo $PR2 export PR=${{ github.event.workflow_run.pull_requests[0].number }} export SHA=${{ github.event.workflow_run.head_sha }} export VARARGS="-n github" From 53a2a019473468494faa940a94a5a161480a0a5f Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 19:34:16 +0100 Subject: [PATCH 54/57] Update codecov.yml --- .github/workflows/codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index db32646d62..53f4e6f997 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -54,3 +54,5 @@ jobs: # if a PR, pass proper information to codecov-cli about SHA, PR number if [ -n "${PR}" ]; then export VARARGS="${VARARGS}-${PR}-${SHA} -P ${PR} -C ${SHA}"; fi ./codecov -v upload-process -Z -t ${{ secrets.CODECOV_TOKEN }} $VARARGS -F github -s ./coverage + env: + GH_TOKEN: ${{ github.token }} From 7f66fe74ef6df995b9768f01b6f1fea5cb51bdfe Mon Sep 17 00:00:00 2001 From: Ian Faust Date: Thu, 12 Dec 2024 22:19:58 +0100 Subject: [PATCH 55/57] Update codecov.yml --- .github/workflows/codecov.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 53f4e6f997..570bbdbcfd 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -46,13 +46,16 @@ jobs: chmod +x codecov - name: Upload to codecov run: | - PR2=`gh pr view ${{ github.event.workflow_run.head_branch }} --json number -q .number` - echo $PR2 - export PR=${{ github.event.workflow_run.pull_requests[0].number }} - export SHA=${{ github.event.workflow_run.head_sha }} - export VARARGS="-n github" + # github does not reliably return the PR number for workflow_run. This workaround will get the PR (if a PR) + if [ "${{ github.repository_owner }}" != "${OWNER}" ]; then BRANCH="${OWNER}:${BRANCH}"; fi + if [ $(git branch --show-current) != $BRANCH ]; then PR=$(gh pr view $BRANCH --json number -q .number); fi + echo uploading $BRANCH + SHA=${{ github.event.workflow_run.head_sha }} + VARARGS="-n github" # if a PR, pass proper information to codecov-cli about SHA, PR number - if [ -n "${PR}" ]; then export VARARGS="${VARARGS}-${PR}-${SHA} -P ${PR} -C ${SHA}"; fi + if [ -n "${PR}" ]; then VARARGS="${VARARGS}-${PR}-${SHA} -P ${PR} -C ${SHA}"; fi ./codecov -v upload-process -Z -t ${{ secrets.CODECOV_TOKEN }} $VARARGS -F github -s ./coverage env: GH_TOKEN: ${{ github.token }} + BRANCH: ${{ github.event.workflow_run.head_branch }} + OWNER: ${{ github.event.workflow_run.head_repository.owner.name }} From 91eb697a945b630afd3079d0b823042ef150d659 Mon Sep 17 00:00:00 2001 From: ftemp32 Date: Thu, 12 Dec 2024 22:25:27 +0100 Subject: [PATCH 56/57] Update __init__.py --- onedal/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onedal/__init__.py b/onedal/__init__.py index 8f7ade667c..80e6027123 100644 --- a/onedal/__init__.py +++ b/onedal/__init__.py @@ -51,6 +51,8 @@ _is_spmd_backend = False +print("hello") + if _is_dpc_backend: try: import onedal._onedal_py_spmd_dpc as _spmd_backend From 7eeb1de470af85913e4215fa802b89d941654d24 Mon Sep 17 00:00:00 2001 From: ftemp32 Date: Thu, 12 Dec 2024 23:29:45 +0100 Subject: [PATCH 57/57] Update __init__.py --- onedal/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onedal/__init__.py b/onedal/__init__.py index 80e6027123..517bc4c471 100644 --- a/onedal/__init__.py +++ b/onedal/__init__.py @@ -51,7 +51,7 @@ _is_spmd_backend = False -print("hello") +print("hello2") if _is_dpc_backend: try: