Comments (11)
okay thanks for verifying , I will recheck from end and update.
from scikit-learn-intelex.
@darshanp4 please use verbose mode for getting more informative logs why you are falling back to stock sklearn.
from scikit-learn-intelex.
@samir-nasibli only seeing following logs on console :
Intel(R) Extension for Scikit-learn* enabled (https://github.com/intel/scikit-learn-intelex)
INFO:sklearnex: sklearn.utils.validation._assert_all_finite: running accelerated version on CPU
from scikit-learn-intelex.
is verbose supported for SVR ?
seen this issue : #1012
from scikit-learn-intelex.
@darshanp4 thank you for the report. I will investigate and share.
from scikit-learn-intelex.
@darshanp4, SVC/SVR with gamma='auto'
parameter is generally supported in 2024.0.1 version, so I guess the reason is on input data side. Can you share what data type is used for x
and y
?
from scikit-learn-intelex.
data_729para.csv
attached data file
data = pd.read_csv(f"data_729para.csv")
x = data.iloc[:, data.columns!='H'].to_numpy()
y = data['H'].to_numpy()
from scikit-learn-intelex.
data_729para.csv attached data file data = pd.read_csv(f"data_729para.csv") x = data.iloc[:, data.columns!='H'].to_numpy() y = data['H'].to_numpy()
@darshanp4 I have checked it with scikit-learn-intelex 2024.0.1
and daal4py 2024.0.1
. But can not reproduce your issue. It works fine on my env:
daal4py 2024.0.1 py310_intel_25 intel
numpy 1.22.4 pypi_0 pypi
pandas 2.1.3 pypi_0 pypi
python 3.10.13 h955ad1f_0
scikit-learn 1.3.2 pypi_0 pypi
scikit-learn-intelex 2024.0.1 py310_intel_25 intel
I was using this script for validation:
import logging
import numpy as np
import pandas as pd
logging.getLogger("sklearnex").setLevel(logging.INFO)
data = pd.read_csv("../data.csv")
from sklearnex import patch_sklearn
patch_sklearn()
X = data.iloc[:, data.columns!='H'].to_numpy()
y = data['H'].to_numpy()
print("x data type: ", X.dtype)
print("y data type: ", y.dtype)
from sklearn.svm import SVR
sv_params = {"gamma": 'auto'}
model = SVR(**sv_params)
model.fit(X, y)
Output:
Intel(R) Extension for Scikit-learn* enabled (https://github.com/intel/scikit-learn-intelex)
x data type: float64
y data type: int64
INFO:sklearnex: sklearn.svm.SVR.fit: running accelerated version on CPU
So actually, it doesn't fallback to stock sklearn.
from scikit-learn-intelex.
That verbose output I also see on console, but did you check that it actually using accelerated oneDAL. If you profile it uses the stock. That's what I reported initial. Can you paste the perf report as well of your run? To confirm it uses the intelex version.
from scikit-learn-intelex.
That verbose output I also see on console, but did you check that it actually using accelerated oneDAL. If you profile it uses the stock. That's what I reported initial. Can you paste the perf report as well of your run? To confirm it uses the intelex version.
Please be careful, your report here doesn't indicate running it on onedal accelerated SVR.fit
:
INFO:sklearnex: sklearn.utils.validation._assert_all_finite: running accelerated version on CPU
In contrast, my logs show this:
INFO:sklearnex: sklearn.svm.SVR.fit: running accelerated version on CPU
Also profiler shows that it uses onedal branch:
1 0.000 0.000 0.000 0.000 _common.py:60(_onedal_cpu_supported)
1 0.000 0.000 0.000 0.000 svm.py:217(_get_onedal_params)
1 0.000 0.000 0.146 0.146 svr.py:145(_onedal_fit)
4 0.000 0.000 0.000 0.000 {built-in method onedal._onedal_py_host.from_table}
1 0.145 0.145 0.145 0.145 {built-in method onedal._onedal_py_host.svm.regression.train}
3 0.000 0.000 0.000 0.000 {built-in method onedal._onedal_py_host.to_table}
from scikit-learn-intelex.
Sorry for late update , issue was due to using below flag
os.environ['NO_DIST']='1'
os.environ['NO_STREAM']='1'
os.environ['OFF_ONEDAL_IFACE']='1'
from scikit-learn-intelex.
Related Issues (20)
- KNN on max series seems slower than cuda-based implementation on comparable devices ? HOT 4
- KMeans is slow on gpu HOT 10
- Longer build time for daal4py with pip HOT 3
- README Hyperlinks down HOT 1
- ValueError: node array from the pickle has an incompatible dtype in RandomForestRegressor from MultiOutputRegressor HOT 2
- Unable to install scikit-learn-intelex on Debian 12 HOT 2
- PCA on gpu hangs HOT 9
- Cannot install in `Python 3.12` due to `daal4py` not being `py3.12`-ready. HOT 1
- pypy3 support for daal4py/sklearnex HOT 2
- RadiusNeighborsClassifier Support
- No module named 'daal4py._oneapi' HOT 1
- daal4py release notes HOT 1
- Feature Request - usage of Modin with GPU acceleration HOT 1
- patch_sklearn() is not working but command line python3 -m sklearnex <file.py> is working HOT 5
- Crash and Cannot load onedal_thread.2.dll HOT 5
- Unable to run patch_sklearn() HOT 1
- INFO HOT 3
- model_selection.learning_curve breaks on some datasets HOT 1
- Logistic regression running with n_jobs=-1 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-learn-intelex.