diff --git a/.azure-pipelines/azure-pipelines-linux.yml b/.azure-pipelines/azure-pipelines-linux.yml index 8c2d499..a9ee22f 100755 --- a/.azure-pipelines/azure-pipelines-linux.yml +++ b/.azure-pipelines/azure-pipelines-linux.yml @@ -8,24 +8,20 @@ jobs: vmImage: ubuntu-latest strategy: matrix: - linux_64_python3.10.____cpython: - CONFIG: linux_64_python3.10.____cpython + linux_64_numpy1.22python3.10.____cpython: + CONFIG: linux_64_numpy1.22python3.10.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.11.____cpython: - CONFIG: linux_64_python3.11.____cpython + linux_64_numpy1.22python3.9.____cpython: + CONFIG: linux_64_numpy1.22python3.9.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.12.____cpython: - CONFIG: linux_64_python3.12.____cpython + linux_64_numpy1.23python3.11.____cpython: + CONFIG: linux_64_numpy1.23python3.11.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.8.____cpython: - CONFIG: linux_64_python3.8.____cpython - UPLOAD_PACKAGES: 'True' - DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 - linux_64_python3.9.____cpython: - CONFIG: linux_64_python3.9.____cpython + linux_64_numpy1.26python3.12.____cpython: + CONFIG: linux_64_numpy1.26python3.12.____cpython UPLOAD_PACKAGES: 'True' DOCKER_IMAGE: quay.io/condaforge/linux-anvil-cos7-x86_64 timeoutInMinutes: 360 diff --git a/.azure-pipelines/azure-pipelines-win.yml b/.azure-pipelines/azure-pipelines-win.yml index 833c571..41bb8c8 100755 --- a/.azure-pipelines/azure-pipelines-win.yml +++ b/.azure-pipelines/azure-pipelines-win.yml @@ -8,20 +8,17 @@ jobs: vmImage: windows-2022 strategy: matrix: - win_64_python3.10.____cpython: - CONFIG: win_64_python3.10.____cpython + win_64_numpy1.22python3.10.____cpython: + CONFIG: win_64_numpy1.22python3.10.____cpython UPLOAD_PACKAGES: 'True' - win_64_python3.11.____cpython: - CONFIG: win_64_python3.11.____cpython + win_64_numpy1.22python3.9.____cpython: + CONFIG: win_64_numpy1.22python3.9.____cpython UPLOAD_PACKAGES: 'True' - win_64_python3.12.____cpython: - CONFIG: win_64_python3.12.____cpython + win_64_numpy1.23python3.11.____cpython: + CONFIG: win_64_numpy1.23python3.11.____cpython UPLOAD_PACKAGES: 'True' - win_64_python3.8.____cpython: - CONFIG: win_64_python3.8.____cpython - UPLOAD_PACKAGES: 'True' - win_64_python3.9.____cpython: - CONFIG: win_64_python3.9.____cpython + win_64_numpy1.26python3.12.____cpython: + CONFIG: win_64_numpy1.26python3.12.____cpython UPLOAD_PACKAGES: 'True' timeoutInMinutes: 360 variables: diff --git a/.ci_support/linux_64_python3.10.____cpython.yaml b/.ci_support/linux_64_numpy1.22python3.10.____cpython.yaml similarity index 57% rename from .ci_support/linux_64_python3.10.____cpython.yaml rename to .ci_support/linux_64_numpy1.22python3.10.____cpython.yaml index 9f28a9b..a5e808b 100644 --- a/.ci_support/linux_64_python3.10.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.22python3.10.____cpython.yaml @@ -1,11 +1,23 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: - cos7 channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +mpich: +- '4' +numpy: +- '1.22' pin_run_as_build: python: min_pin: x.x @@ -14,3 +26,8 @@ python: - 3.10.* *_cpython target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name +- - python + - numpy diff --git a/.ci_support/linux_64_python3.9.____cpython.yaml b/.ci_support/linux_64_numpy1.22python3.9.____cpython.yaml similarity index 57% rename from .ci_support/linux_64_python3.9.____cpython.yaml rename to .ci_support/linux_64_numpy1.22python3.9.____cpython.yaml index 2c75808..c24fd66 100644 --- a/.ci_support/linux_64_python3.9.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.22python3.9.____cpython.yaml @@ -1,11 +1,23 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: - cos7 channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +mpich: +- '4' +numpy: +- '1.22' pin_run_as_build: python: min_pin: x.x @@ -14,3 +26,8 @@ python: - 3.9.* *_cpython target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name +- - python + - numpy diff --git a/.ci_support/linux_64_python3.11.____cpython.yaml b/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml similarity index 57% rename from .ci_support/linux_64_python3.11.____cpython.yaml rename to .ci_support/linux_64_numpy1.23python3.11.____cpython.yaml index 2024659..8092474 100644 --- a/.ci_support/linux_64_python3.11.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.23python3.11.____cpython.yaml @@ -1,11 +1,23 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: - cos7 channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +mpich: +- '4' +numpy: +- '1.23' pin_run_as_build: python: min_pin: x.x @@ -14,3 +26,8 @@ python: - 3.11.* *_cpython target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name +- - python + - numpy diff --git a/.ci_support/linux_64_python3.12.____cpython.yaml b/.ci_support/linux_64_numpy1.26python3.12.____cpython.yaml similarity index 57% rename from .ci_support/linux_64_python3.12.____cpython.yaml rename to .ci_support/linux_64_numpy1.26python3.12.____cpython.yaml index 6184c6e..8a184c2 100644 --- a/.ci_support/linux_64_python3.12.____cpython.yaml +++ b/.ci_support/linux_64_numpy1.26python3.12.____cpython.yaml @@ -1,11 +1,23 @@ +c_stdlib: +- sysroot +c_stdlib_version: +- '2.17' cdt_name: - cos7 channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- gxx +cxx_compiler_version: +- '13' docker_image: - quay.io/condaforge/linux-anvil-cos7-x86_64 +mpich: +- '4' +numpy: +- '1.26' pin_run_as_build: python: min_pin: x.x @@ -14,3 +26,8 @@ python: - 3.12.* *_cpython target_platform: - linux-64 +zip_keys: +- - c_stdlib_version + - cdt_name +- - python + - numpy diff --git a/.ci_support/linux_64_python3.8.____cpython.yaml b/.ci_support/linux_64_python3.8.____cpython.yaml deleted file mode 100644 index ca0d923..0000000 --- a/.ci_support/linux_64_python3.8.____cpython.yaml +++ /dev/null @@ -1,16 +0,0 @@ -cdt_name: -- cos7 -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -docker_image: -- quay.io/condaforge/linux-anvil-cos7-x86_64 -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.8.* *_cpython -target_platform: -- linux-64 diff --git a/.ci_support/win_64_python3.10.____cpython.yaml b/.ci_support/win_64_numpy1.22python3.10.____cpython.yaml similarity index 68% rename from .ci_support/win_64_python3.10.____cpython.yaml rename to .ci_support/win_64_numpy1.22python3.10.____cpython.yaml index d30d308..f2d1070 100644 --- a/.ci_support/win_64_python3.10.____cpython.yaml +++ b/.ci_support/win_64_numpy1.22python3.10.____cpython.yaml @@ -1,7 +1,13 @@ +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- vs2019 +numpy: +- '1.22' pin_run_as_build: python: min_pin: x.x @@ -10,3 +16,6 @@ python: - 3.10.* *_cpython target_platform: - win-64 +zip_keys: +- - python + - numpy diff --git a/.ci_support/win_64_python3.9.____cpython.yaml b/.ci_support/win_64_numpy1.22python3.9.____cpython.yaml similarity index 68% rename from .ci_support/win_64_python3.9.____cpython.yaml rename to .ci_support/win_64_numpy1.22python3.9.____cpython.yaml index 53204fb..0ff9638 100644 --- a/.ci_support/win_64_python3.9.____cpython.yaml +++ b/.ci_support/win_64_numpy1.22python3.9.____cpython.yaml @@ -1,7 +1,13 @@ +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- vs2019 +numpy: +- '1.22' pin_run_as_build: python: min_pin: x.x @@ -10,3 +16,6 @@ python: - 3.9.* *_cpython target_platform: - win-64 +zip_keys: +- - python + - numpy diff --git a/.ci_support/win_64_python3.11.____cpython.yaml b/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml similarity index 68% rename from .ci_support/win_64_python3.11.____cpython.yaml rename to .ci_support/win_64_numpy1.23python3.11.____cpython.yaml index 05291b6..e4f87da 100644 --- a/.ci_support/win_64_python3.11.____cpython.yaml +++ b/.ci_support/win_64_numpy1.23python3.11.____cpython.yaml @@ -1,7 +1,13 @@ +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- vs2019 +numpy: +- '1.23' pin_run_as_build: python: min_pin: x.x @@ -10,3 +16,6 @@ python: - 3.11.* *_cpython target_platform: - win-64 +zip_keys: +- - python + - numpy diff --git a/.ci_support/win_64_python3.12.____cpython.yaml b/.ci_support/win_64_numpy1.26python3.12.____cpython.yaml similarity index 68% rename from .ci_support/win_64_python3.12.____cpython.yaml rename to .ci_support/win_64_numpy1.26python3.12.____cpython.yaml index fdaa043..a5fa04d 100644 --- a/.ci_support/win_64_python3.12.____cpython.yaml +++ b/.ci_support/win_64_numpy1.26python3.12.____cpython.yaml @@ -1,7 +1,13 @@ +c_stdlib: +- vs channel_sources: - conda-forge channel_targets: - conda-forge main +cxx_compiler: +- vs2019 +numpy: +- '1.26' pin_run_as_build: python: min_pin: x.x @@ -10,3 +16,6 @@ python: - 3.12.* *_cpython target_platform: - win-64 +zip_keys: +- - python + - numpy diff --git a/.ci_support/win_64_python3.8.____cpython.yaml b/.ci_support/win_64_python3.8.____cpython.yaml deleted file mode 100644 index 4f0d022..0000000 --- a/.ci_support/win_64_python3.8.____cpython.yaml +++ /dev/null @@ -1,12 +0,0 @@ -channel_sources: -- conda-forge -channel_targets: -- conda-forge main -pin_run_as_build: - python: - min_pin: x.x - max_pin: x.x -python: -- 3.8.* *_cpython -target_platform: -- win-64 diff --git a/.scripts/build_steps.sh b/.scripts/build_steps.sh index 6c805a9..af0b9ac 100755 --- a/.scripts/build_steps.sh +++ b/.scripts/build_steps.sh @@ -43,6 +43,8 @@ setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" source run_conda_forge_build_setup + + # make the build number clobber make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}" diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat index 24ef201..33f3277 100755 --- a/.scripts/run_win_build.bat +++ b/.scripts/run_win_build.bat @@ -24,7 +24,7 @@ set "CONDA_LIBMAMBA_SOLVER_NO_CHANNELS_FROM_INSTALLED=1" :: Provision the necessary dependencies to build the recipe later echo Installing dependencies -mamba.exe install "python=3.10" pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes +mamba.exe install pip mamba conda-build conda-forge-ci-setup=4 "conda-build>=24.1" -c conda-forge --strict-channel-priority --yes if !errorlevel! neq 0 exit /b !errorlevel! :: Set basic configuration @@ -43,7 +43,7 @@ if EXIST LICENSE.txt ( ) if NOT [%flow_run_id%] == [] ( - set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" + set "EXTRA_CB_OPTIONS=%EXTRA_CB_OPTIONS% --extra-meta flow_run_id=%flow_run_id% remote_url=%remote_url% sha=%sha%" ) call :end_group diff --git a/README.md b/README.md index 5d55bd5..414535e 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Feedstock license: [BSD-3-Clause](https://github.com/conda-forge/scikit-learn-in Home: https://intel.github.io/scikit-learn-intelex -Package license: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT +Package license: Apache-2.0 -Summary: Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application. +Summary: Intel(R) Extension for Scikit-learn* is a seamless way to speed up your Scikit-learn application. Development: https://github.com/intel/scikit-learn-intelex @@ -41,73 +41,59 @@ Current build status <table> <thead><tr><th>Variant</th><th>Status</th></tr></thead> <tbody><tr> - <td>linux_64_python3.10.____cpython</td> + <td>linux_64_numpy1.22python3.10.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_python3.10.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_numpy1.22python3.10.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>linux_64_python3.11.____cpython</td> + <td>linux_64_numpy1.22python3.9.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_python3.11.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_numpy1.22python3.9.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>linux_64_python3.12.____cpython</td> + <td>linux_64_numpy1.23python3.11.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_python3.12.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_numpy1.23python3.11.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>linux_64_python3.8.____cpython</td> + <td>linux_64_numpy1.26python3.12.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_python3.8.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_numpy1.26python3.12.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>linux_64_python3.9.____cpython</td> + <td>win_64_numpy1.22python3.10.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=linux&configuration=linux%20linux_64_python3.9.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_numpy1.22python3.10.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>win_64_python3.10.____cpython</td> + <td>win_64_numpy1.22python3.9.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_python3.10.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_numpy1.22python3.9.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>win_64_python3.11.____cpython</td> + <td>win_64_numpy1.23python3.11.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_python3.11.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_numpy1.23python3.11.____cpython" alt="variant"> </a> </td> </tr><tr> - <td>win_64_python3.12.____cpython</td> + <td>win_64_numpy1.26python3.12.____cpython</td> <td> <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_python3.12.____cpython" alt="variant"> - </a> - </td> - </tr><tr> - <td>win_64_python3.8.____cpython</td> - <td> - <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_python3.8.____cpython" alt="variant"> - </a> - </td> - </tr><tr> - <td>win_64_python3.9.____cpython</td> - <td> - <a href="https://dev.azure.com/conda-forge/feedstock-builds/_build/latest?definitionId=12395&branchName=main"> - <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_python3.9.____cpython" alt="variant"> + <img src="https://dev.azure.com/conda-forge/feedstock-builds/_apis/build/status/scikit-learn-intelex-feedstock?branchName=main&jobName=win&configuration=win%20win_64_numpy1.26python3.12.____cpython" alt="variant"> </a> </td> </tr> diff --git a/build-locally.py b/build-locally.py index d78427b..6788aea 100755 --- a/build-locally.py +++ b/build-locally.py @@ -1,8 +1,11 @@ -#!/usr/bin/env python3 +#!/bin/sh +"""exec" "python3" "$0" "$@" #""" # fmt: off # fmt: on # # This file has been generated by conda-smithy in order to build the recipe # locally. # +# The line above this comment is a bash / sh / zsh guard +# to stop people from running it with the wrong interpreter import glob import os import platform diff --git a/recipe/bld.bat b/recipe/bld.bat new file mode 100644 index 0000000..a3bfe50 --- /dev/null +++ b/recipe/bld.bat @@ -0,0 +1,18 @@ +@echo off + +IF NOT DEFINED PYTHON (set PYTHON="python") +IF DEFINED PKG_VERSION (set SKLEARNEX_VERSION=%PKG_VERSION%) +IF NOT DEFINED DALROOT (set DALROOT=%PREFIX%) +IF NOT DEFINED MPIROOT IF "%NO_DIST%"=="" (set MPIROOT=%PREFIX%) + +rem reset preferred compilers to avoid usage of icx/icpx by default in all cases +set CC=cl.exe +set CXX=cl.exe + +rem source compiler if DPCPPROOT is set outside of conda-build +IF DEFINED DPCPPROOT ( + echo "Sourcing DPCPPROOT" + call "%DPCPPROOT%\env\vars.bat" +) + +%PYTHON% setup.py install --single-version-externally-managed --record record.txt diff --git a/recipe/build.sh b/recipe/build.sh new file mode 100755 index 0000000..89c026f --- /dev/null +++ b/recipe/build.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ -z "${PYTHON}" ]; then + export PYTHON=python +fi + +if [ ! -z "${PKG_VERSION}" ]; then + export SKLEARNEX_VERSION=$PKG_VERSION +fi + +if [ -z "${DALROOT}" ]; then + export DALROOT=${PREFIX} +fi + +if [ -z "${MPIROOT}" ] && [ -z "${NO_DIST}" ]; then + export MPIROOT=${PREFIX} +fi +# reset preferred compilers to avoid usage of icx/icpx by default in all cases +if [ ! -z "${CC_FOR_BUILD}" ] && [ ! -z "${CXX_FOR_BUILD}" ]; then + export CC=$CC_FOR_BUILD + export CXX=$CXX_FOR_BUILD +fi +# source compiler if DPCPPROOT is set outside of conda-build +if [ ! -z "${DPCPPROOT}" ]; then + source ${DPCPPROOT}/env/vars.sh +fi + +${PYTHON} setup.py install --single-version-externally-managed --record record.txt diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 3e7849e..4186a30 100755 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -1,52 +1,85 @@ +# NB: this recipe should be synced between sklearnex repo and feedstocks + {% set name = "scikit-learn-intelex" %} -{% set version = "2024.6.0" %} +{% set version = "2025.0.1" %} {% set buildnumber = 1 %} package: name: {{ name|lower }} version: {{ version }} +# Reminder: source should point to path for repo or github archive for feedstock source: - url: https://github.com/intel/scikit-learn-intelex/archive/{{ version }}.tar.gz - sha256: 7ae556ca5923d3fb7a88f6534f4c48984bc8616b3a3827d7d44b655c6b92624b + url: https://github.com/Alexsandruss/scikit-learn-intelex/archive/{{ version }}.tar.gz + sha256: 0758aee78a7632faa84e6ebd8ebf503ab45ac24a274c8f01a17a11482b5429c5 +# source: +# path: .. build: skip: true # [not (linux64 or win)] number: {{ buildnumber }} - script: - - export DALROOT="${PREFIX}" # [not win] - - set DALROOT=%PREFIX% # [win] - - {{ PYTHON }} setup_sklearnex.py install --single-version-externally-managed --record=record_sklearnex.txt + include_recipe: False + script_env: + - DPCPPROOT + - DALROOT + - NO_DIST =1 # [win] requirements: + build: + - make # [linux] + - dpcpp_linux-64 # [linux64] + # - dpcpp_win-64 # [win] + - {{ compiler('cxx') }} # [linux64 or win] + # conda-forge feedstock specific + - {{ stdlib("c") }} # [linux64 or win] host: - python - setuptools - - dal-include =={{ version }} + - cmake + - clang-format + - cython + - jinja2 + - pybind11 + - numpy {{ numpy }} + - mpich # [not win] + # - impi-devel # [win] + # dal-devel pinning depends on the recipe location (repo or feedstock) + # - dal-devel + - dal-devel ==2024.6.0 run: - python - - daal4py =={{ version }} - - scikit-learn + - {{ pin_compatible('numpy') }} + - dpcpp-cpp-rt # [linux64] + # dal pinning depends on the recipe location (repo or feedstock) + # - dal + - dal ==2024.6.0 test: requires: - pandas + - scikit-learn + - xgboost + - lightgbm + - catboost - pytest + - pyyaml + - mpich # [not win] + # - impi_rt # [win] source_files: - - sklearnex/tests + - .ci + - examples + - tests + - daal4py/sklearn commands: - - cd sklearnex - - python -c "import sklearnex" - - python -c "from sklearnex import patch_sklearn; patch_sklearn()" - - python -m pytest --pyargs --verbose . + - python -c "import sklearnex; sklearnex.patch_sklearn()" about: home: https://intel.github.io/scikit-learn-intelex - license: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT + license: Apache-2.0 license_file: - LICENSE - doc/third-party-programs-sklearnex.txt - summary: Intel(R) Extension for Scikit-learn is a seamless way to speed up your Scikit-learn application. + summary: Intel(R) Extension for Scikit-learn* is a seamless way to speed up your Scikit-learn application. description: | <strong>LEGAL NOTICE: Use of this software package is subject to the software license agreement (as set forth above, in the license section of @@ -61,6 +94,7 @@ about: extra: recipe-maintainers: + # GitHub IDs for maintainers of the recipe. - napetrov - Alexsandruss - maria-Petrova diff --git a/recipe/run_test.bat b/recipe/run_test.bat new file mode 100644 index 0000000..dcdc748 --- /dev/null +++ b/recipe/run_test.bat @@ -0,0 +1,17 @@ +@echo off + +rem %1 - scikit-learn-intelex repo root (leave empty if it's PWD) + +set exitcode=0 + +IF NOT DEFINED PYTHON (set PYTHON="python") + +%PYTHON% -c "from sklearnex import patch_sklearn; patch_sklearn()" || set exitcode=1 + +%PYTHON% -m unittest discover -v -s %1%tests -p test*.py || set exitcode=1 + +pytest --verbose --pyargs daal4py || set exitcode=1 +pytest --verbose --pyargs sklearnex || set exitcode=1 +pytest --verbose --pyargs onedal || set exitcode=1 +%PYTHON% %1%.ci\scripts\test_global_patch.py || set exitcode=1 +EXIT /B %exitcode% diff --git a/recipe/run_test.sh b/recipe/run_test.sh new file mode 100755 index 0000000..c04f131 --- /dev/null +++ b/recipe/run_test.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +sklex_root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +count=3 +while [[ count -ne 0 ]]; do + if [[ -d $sklex_root/.ci/ && -d $sklex_root/examples/ && -d $sklex_root/tests/ && -d $sklex_root/daal4py/sklearn ]]; then + break + fi + sklex_root="$( dirname "${sklex_root}" )" + count=$(($count - 1)) +done + +if [[ count -eq 0 ]]; then + echo "run_test.sh did not find the required testing directories" + exit 1 +fi + +return_code=0 + +if [ -z "${PYTHON}" ]; then + export PYTHON=python +fi + +${PYTHON} -c "from sklearnex import patch_sklearn; patch_sklearn()" +return_code=$(($return_code + $?)) + +echo "NO_DIST=$NO_DIST" +if [[ ! $NO_DIST ]]; then + echo "MPI unittest discover testing ..." + mpirun --version + mpirun -n 4 python -m unittest discover -v -s ${sklex_root}/tests -p test*spmd*.py + return_code=$(($return_code + $?)) +fi + +${PYTHON} -m unittest discover -v -s ${sklex_root}/tests -p test*.py +return_code=$(($return_code + $?)) + +pytest --verbose --pyargs daal4py +return_code=$(($return_code + $?)) + +pytest --verbose --pyargs sklearnex +return_code=$(($return_code + $?)) + +pytest --verbose --pyargs onedal +return_code=$(($return_code + $?)) + +${PYTHON} ${sklex_root}/.ci/scripts/test_global_patch.py +return_code=$(($return_code + $?)) + +exit $return_code