{"id":22338,"library":"scikit-learn-intelex","title":"Intel® Extension for Scikit-learn","description":"Intel® Extension for Scikit-learn (formerly daal4py) accelerates scikit-learn algorithms on Intel hardware via patching. Version 2026.0.0 supports Python >=3.7 and scikit-learn 1.6-1.8. Monthly releases.","status":"active","version":"2026.0.0","language":"python","source_language":"en","source_url":"https://github.com/intel/scikit-learn-intelex","tags":["scikit-learn","intel","accelerator","optimization","machine-learning"],"install":[{"cmd":"pip install scikit-learn-intelex","lang":"bash","label":"PyPI"},{"cmd":"conda install -c conda-forge scikit-learn-intelex","lang":"bash","label":"Conda"}],"dependencies":[{"reason":"Core dependency, must be installed separately if not bundled","package":"scikit-learn","optional":true}],"imports":[{"note":"Function name is patch_sklearn, not patch.","wrong":"from sklearnex import patch","symbol":"patch_sklearn","correct":"from sklearnex import patch_sklearn"},{"note":"","wrong":"","symbol":"unpatch_sklearn","correct":"from sklearnex import unpatch_sklearn"}],"quickstart":{"code":"from sklearnex import patch_sklearn\npatch_sklearn()\n\nfrom sklearn.linear_model import Ridge\nridge = Ridge(alpha=1.0)\nridge.fit([[0, 0], [1, 1]], [0, 1])\nprint(ridge.predict([[0.5, 0.5]]))","lang":"python","description":"Patch scikit-learn to use Intel-optimized backends, then use scikit-learn API normally."},"warnings":[{"fix":"Ensure patch_sklearn() is called early, typically at module level.","message":"Call patch_sklearn() after importing scikit-learn, but before creating any estimator instances. Patch order matters.","severity":"gotcha","affected_versions":"all"},{"fix":"Avoid relying on dpctl tensor internals; use standard NumPy/PyTorch arrays or dpctl.tensor public API.","message":"Internal dpctl tensor handling functionality is deprecated and will be removed in a future release.","severity":"deprecated","affected_versions":">=2025.11.0"},{"fix":"Verify algorithm support in the official documentation before relying on acceleration.","message":"scikit-learn-intelex does not support all scikit-learn algorithms (e.g., some ensemble methods still run on original scikit-learn). Check the list of supported algorithms.","severity":"breaking","affected_versions":"all"},{"fix":"Use patch_sklearn() and then import from sklearn.* instead of sklearnex.* for consistency.","message":"If you import from sklearnex estimators directly (e.g., from sklearnex.linear_model import Ridge), it may not be patched correctly and can conflict with patched scikit-learn.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install scikit-learn-intelex","cause":"Package name is 'scikit-learn-intelex', not 'sklearnex'. Installation missing.","error":"ModuleNotFoundError: No module named 'sklearnex'"},{"fix":"from sklearnex import patch_sklearn; patch_sklearn()","cause":"Function name is patch_sklearn, not patch.","error":"AttributeError: module 'sklearnex' has no attribute 'patch'"},{"fix":"Upgrade to scikit-learn-intelex >=2025.10.0 and ensure matching sklearn version.","cause":"Some internal parameters changed between scikit-learn versions. Example with LogisticRegression in sklearn 1.8.","error":"ValueError: The parameter 'verbose' is not recognized."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}