Skip to content

Commit

Permalink
Conda envs and CI conf update
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexsandruss committed Jun 7, 2024
1 parent 6798d01 commit 8e9dde5
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 6 deletions.
22 changes: 18 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,27 @@ jobs:
pip install isort black
isort --check . && black --check .
displayName: 'Linting'
- job: Linux_Sklearn
- job: Linux
dependsOn: Lint
strategy:
matrix:
Pip:
PKG_MANAGER: "pip"
Conda:
PKG_MANAGER: "conda"
pool:
vmImage: "ubuntu-latest"
steps:
- template: test-configuration.yml
- job: Windows_Sklearn
- template: test-configuration-linux.yml
- job: Windows
dependsOn: Lint
strategy:
matrix:
Pip:
PKG_MANAGER: "pip"
Conda:
PKG_MANAGER: "conda"
pool:
vmImage: "windows-latest"
steps:
- template: test-configuration.yml
- template: test-configuration-win.yml
1 change: 1 addition & 0 deletions envs/conda-env-rapids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ channels:
- rapidsai
- conda-forge
- nvidia
- nodefaults
dependencies:
- python=3.10
- rapids
Expand Down
5 changes: 4 additions & 1 deletion envs/conda-env-sklearn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ dependencies:
- catboost
- lightgbm
- faiss-cpu
- scikit-learn-intelex
- modin-all
- intel::scikit-learn-intelex
- intel::daal4py
- intel::dpctl
- intel::dpnp
# sklbench dependencies
- scikit-learn
- pandas
Expand Down
18 changes: 17 additions & 1 deletion test-configuration.yml → test-configuration-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,28 @@ steps:
inputs:
versionSpec: "$(python.version)"
- script: |
conda create -y -n bench-env -c conda-forge -c nodefaults python=$(python.version)
displayName: Environment update
- script: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate bench-env
pip install -r envs/requirements-sklearn.txt
pip list
displayName: Install requirements
displayName: Install requirements via pip
condition: eq(variables['PKG_MANAGER'], 'pip')
- script: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate bench-env
conda env update -f envs/conda-env-sklearn.yml -n bench-env
displayName: Install requirements via conda
condition: eq(variables['PKG_MANAGER'], 'conda')
- script: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate bench-env
python -m sklbench -l DEBUG -p algorithm:library=sklearnex algorithm:estimator=KMeans data:dataset=a9a
displayName: CLI arguments run
- script: |
source /usr/share/miniconda/etc/profile.d/conda.sh
conda activate bench-env
python -m sklbench -l INFO -c configs/testing/azure-pipelines-ci.json --prefetch-datasets --report --diff-cols library --compatibility-mode
displayName: CI config run
48 changes: 48 additions & 0 deletions test-configuration-win.yml
Original file line number Diff line number Diff line change
@@ -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.
#===============================================================================
steps:
- task: UsePythonVersion@0
displayName: "Use Python $(python.version)"
inputs:
versionSpec: "$(python.version)"
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to Windows PATH
- script: |
conda create -y -n bench-env -c conda-forge -c nodefaults python=$(python.version)
displayName: Environment update
- script: |
call activate bench-env
conda activate bench-env
pip install -r envs/requirements-sklearn.txt
pip list
displayName: Install requirements via pip
condition: eq(variables['PKG_MANAGER'], 'pip')
- script: |
call activate bench-env
conda activate bench-env
conda env update -f envs/conda-env-sklearn.yml -n bench-env
displayName: Install requirements via conda
condition: eq(variables['PKG_MANAGER'], 'conda')
- script: |
call activate bench-env
conda activate bench-env
python -m sklbench -l DEBUG -p algorithm:library=sklearnex algorithm:estimator=KMeans data:dataset=a9a
displayName: CLI arguments run
- script: |
call activate bench-env
conda activate bench-env
python -m sklbench -l INFO -c configs/testing/azure-pipelines-ci.json --prefetch-datasets --report --diff-cols library --compatibility-mode
displayName: CI config run

0 comments on commit 8e9dde5

Please sign in to comment.