Installation

Clone the code

git clone https://github.com/interpretml/interpret.git

(Optional) Create a conda environment and activate it

conda create --name ENV_NAME python=3.7

conda activate ENV_NAME

Install interpret with every dependency

cd interpret/scripts

make install

cd ../python/interpret-core

pip install -e .[required,debug,notebook,plotly,lime,sensitivity,shap,ebm,linear,decisiontree,treeinterpreter,dash,skoperules,testing]

Run Unit Tests

cd interpret/scripts

make test

It is also possible to run the specific unit tests for Native code / Python:

Build and run interpret/shared/ebm_native/ebm_native_test

cd interpret/python/interpret-core

python -m pytest

To run all tests add the parameter --runslow

python -m pytest --runslow
  1. Install the Text Explorer UI extension

  2. Open the Command Palette (e.g. press F1)

  3. (Optional) If a conda environment is being used choose Python: Select Interpreter and select the correct environment

  4. Choose Python: Configure Tests and select pytest

  5. Select the root folder as interpret/python

  6. Once you have chosen the test framework, you should be able to open the Test Explorer Extension and run all Python unit tests

    • To see the output of a test go to the Output Window –> Python Test Log

    • Some tests depend on C++ code, so it should be installed