Skip to content

Commit bf8dffc

Browse files
authored
Update requirements (#124)
* Update reqs * Fix 'daal4py not found' warning
1 parent 50d1c32 commit bf8dffc

File tree

6 files changed

+17
-31
lines changed

6 files changed

+17
-31
lines changed

azure-pipelines.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
inputs:
1313
versionSpec: "$(python.version)"
1414
- script: |
15+
pip install -r requirements-common.txt
1516
pip install -r sklearn_bench/requirements.txt
1617
python runner.py --configs configs/testing/sklearn.json
1718
displayName: Run bench
@@ -24,6 +25,7 @@ jobs:
2425
inputs:
2526
versionSpec: "$(python.version)"
2627
- script: |
28+
pip install -r requirements-common.txt
2729
pip install -r xgboost_bench/requirements.txt
2830
python runner.py --configs configs/testing/xgboost.json --no-intel-optimized
2931
displayName: Run bench
@@ -36,6 +38,7 @@ jobs:
3638
inputs:
3739
versionSpec: "$(python.version)"
3840
- script: |
41+
pip install -r requirements-common.txt
3942
pip install -r daal4py_bench/requirements.txt
4043
python runner.py --configs configs/testing/daal4py.json --no-intel-optimized
4144
displayName: Run bench

bench.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -250,25 +250,16 @@ def size_str(shape):
250250
return 'x'.join(str(d) for d in shape)
251251

252252

253-
def set_daal_num_threads(num_threads):
254-
try:
255-
import daal4py
256-
if num_threads:
257-
daal4py.daalinit(nthreads=num_threads)
258-
except ImportError:
259-
logging.info('@ Package "daal4py" was not found. Number of threads '
260-
'is being ignored')
261-
262-
263253
def prepare_daal_threads(num_threads=-1):
264254
try:
265-
if num_threads > 0:
266-
set_daal_num_threads(num_threads)
267255
import daal4py
256+
if num_threads > 0:
257+
daal4py.daalinit(nthreads=num_threads)
268258
num_threads = daal4py.num_threads()
269259
except ImportError:
260+
logging.warning('@ Package "daal4py" was not found. Number of threads '
261+
'is being ignored')
270262
num_threads = 1
271-
272263
return num_threads
273264

274265

daal4py_bench/requirements.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
scikit-learn < 1.1 # TODO: remove after scikit-learn-intelex release with fix
2-
pandas
3-
daal4py
4-
openpyxl
5-
tqdm
6-
requests
1+
daal4py==2023.0.0
2+
dpcpp-cpp-rt==2023.0.0

requirements-common.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
scikit-learn==1.2.0
2+
pandas==1.5.2
3+
openpyxl
4+
tqdm
5+
requests

sklearn_bench/requirements.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
scikit-learn < 1.1 # TODO: remove after scikit-learn-intelex release with fix
2-
pandas
3-
scikit-learn-intelex
4-
openpyxl
5-
tqdm
6-
requests
1+
scikit-learn-intelex==2023.0.0
2+
dpcpp-cpp-rt==2023.0.0

xgboost_bench/requirements.txt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
scikit-learn
2-
pandas
3-
xgboost
4-
openpyxl
5-
tqdm
6-
requests
1+
xgboost==1.7.2

0 commit comments

Comments
 (0)