Verbose Mode

Use Intel® Extension for Scikit-learn* in verbose mode to find out which implementation of the algorithm is currently used, Intel® Extension for Scikit-learn* or original Scikit-learn.

Note

Verbose mode is only available for supported algorithms.

To enable verbose mode, set the SKLEARNEX_VERBOSE environment variable as shown below:

  • On Linux and MacOS:

    export SKLEARNEX_VERBOSE=INFO
    
  • On Windows:

    set SKLEARNEX_VERBOSE=INFO
    

Alternatively, get Intel® Extension for Scikit-learn* logger and set its logging level in the Python code:

import logging
logger = logging.getLogger('sklearnex')
logger.setLevel(logging.INFO)

During the calls that use Intel-optimized scikit-learn, you will receive additional print statements that indicate which implementation is being called. These print statements are only available for supported algorithms.

For example, for DBSCAN you get one of these print statements depending on which implementation is used:

INFO:sklearnex: sklearn.cluster.DBSCAN.fit: running accelerated version on CPU
INFO:sklearnex: sklearn.cluster.DBSCAN.fit: fallback to original Scikit-learn