Skip to content

Commit 1510e96

Browse files
committed
Conda envs and CI conf update
1 parent 6798d01 commit 1510e96

5 files changed

+87
-7
lines changed

azure-pipelines.yml

+18-4
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,27 @@ jobs:
3131
pip install isort black
3232
isort --check . && black --check .
3333
displayName: 'Linting'
34-
- job: Linux_Sklearn
34+
- job: Linux
35+
dependsOn: Lint
36+
strategy:
37+
matrix:
38+
Pip:
39+
PKG_MANAGER: "pip"
40+
Conda:
41+
PKG_MANAGER: "conda"
3542
pool:
3643
vmImage: "ubuntu-latest"
3744
steps:
38-
- template: test-configuration.yml
39-
- job: Windows_Sklearn
45+
- template: test-configuration-linux.yml
46+
- job: Windows
47+
dependsOn: Lint
48+
strategy:
49+
matrix:
50+
Pip:
51+
PKG_MANAGER: "pip"
52+
Conda:
53+
PKG_MANAGER: "conda"
4054
pool:
4155
vmImage: "windows-latest"
4256
steps:
43-
- template: test-configuration.yml
57+
- template: test-configuration-win.yml

envs/conda-env-rapids.yml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ channels:
22
- rapidsai
33
- conda-forge
44
- nvidia
5+
- nodefaults
56
dependencies:
67
- python=3.10
78
- rapids

envs/conda-env-sklearn.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ dependencies:
99
- catboost
1010
- lightgbm
1111
- faiss-cpu
12-
- scikit-learn-intelex
1312
- modin-all
13+
- intel::scikit-learn-intelex
14+
- intel::daal4py
15+
- intel::dpctl
16+
- intel::dpnp
1417
# sklbench dependencies
15-
- scikit-learn
18+
- scikit-learn=1.4.*
1619
- pandas
1720
- tabulate
1821
- fastparquet

test-configuration-linux.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#===============================================================================
2+
# Copyright 2024 Intel Corporation
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#===============================================================================
16+
steps:
17+
- task: UsePythonVersion@0
18+
displayName: "Use Python $(python.version)"
19+
inputs:
20+
versionSpec: "$(python.version)"
21+
- script: |
22+
conda create -y -n bench-env -c conda-forge -c nodefaults python=$(python.version)
23+
displayName: Environment update
24+
- script: |
25+
source /usr/share/miniconda/etc/profile.d/conda.sh
26+
conda activate bench-env
27+
pip install -r envs/requirements-sklearn.txt
28+
pip list
29+
displayName: Install requirements via pip
30+
condition: eq(variables['PKG_MANAGER'], 'pip')
31+
- script: |
32+
source /usr/share/miniconda/etc/profile.d/conda.sh
33+
conda activate bench-env
34+
conda env update -f envs/conda-env-sklearn.yml -n bench-env
35+
conda list -n bench-env
36+
displayName: Install requirements via conda
37+
condition: eq(variables['PKG_MANAGER'], 'conda')
38+
- script: |
39+
source /usr/share/miniconda/etc/profile.d/conda.sh
40+
conda activate bench-env
41+
python -m sklbench -l DEBUG -p algorithm:library=sklearnex algorithm:estimator=KMeans data:dataset=a9a
42+
displayName: CLI arguments run
43+
- script: |
44+
source /usr/share/miniconda/etc/profile.d/conda.sh
45+
conda activate bench-env
46+
python -m sklbench -l INFO -c configs/testing/azure-pipelines-ci.json --prefetch-datasets --report --diff-cols library --compatibility-mode
47+
displayName: CI config run

test-configuration.yml renamed to test-configuration-win.yml

+16-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,28 @@ steps:
1818
displayName: "Use Python $(python.version)"
1919
inputs:
2020
versionSpec: "$(python.version)"
21+
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
22+
displayName: Add conda to Windows PATH
2123
- script: |
24+
conda create -y -n bench-env -c conda-forge -c nodefaults python=$(python.version)
25+
displayName: Environment update
26+
- script: |
27+
call activate bench-env
2228
pip install -r envs/requirements-sklearn.txt
2329
pip list
24-
displayName: Install requirements
30+
displayName: Install requirements via pip
31+
condition: eq(variables['PKG_MANAGER'], 'pip')
32+
- script: |
33+
call activate bench-env
34+
conda env update -f envs/conda-env-sklearn.yml -n bench-env
35+
conda list -n bench-env
36+
displayName: Install requirements via conda
37+
condition: eq(variables['PKG_MANAGER'], 'conda')
2538
- script: |
39+
call activate bench-env
2640
python -m sklbench -l DEBUG -p algorithm:library=sklearnex algorithm:estimator=KMeans data:dataset=a9a
2741
displayName: CLI arguments run
2842
- script: |
43+
call activate bench-env
2944
python -m sklbench -l INFO -c configs/testing/azure-pipelines-ci.json --prefetch-datasets --report --diff-cols library --compatibility-mode
3045
displayName: CI config run

0 commit comments

Comments
 (0)