1{
2 lib,
3 fetchPypi,
4 buildPythonPackage,
5
6 matplotlib,
7 numpy,
8 scipy,
9 tqdm,
10 scikit-learn,
11 scikit-image,
12
13 pytestCheckHook,
14 pythonOlder,
15}:
16
17buildPythonPackage rec {
18 pname = "lime";
19 version = "0.2.0.1";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.5";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-dpYOTwVf61Pom1AiODuvyHtj8lusYmWYSwozPRpX94E=";
27 };
28
29 propagatedBuildInputs = [
30 matplotlib
31 numpy
32 scipy
33 tqdm
34 scikit-learn
35 scikit-image
36 ];
37
38 nativeCheckInputs = [ pytestCheckHook ];
39
40 disabledTestPaths = [
41 # touches network
42 "lime/tests/test_lime_text.py"
43 ];
44
45 pythonImportsCheck = [
46 "lime.exceptions"
47 "lime.explanation"
48 "lime.lime_base"
49 "lime.lime_image"
50 "lime.lime_text"
51 ];
52
53 meta = with lib; {
54 description = "Local Interpretable Model-Agnostic Explanations for machine learning classifiers";
55 homepage = "https://github.com/marcotcr/lime";
56 changelog = "https://github.com/marcotcr/lime/releases/tag/${version}";
57 license = licenses.bsd2;
58 maintainers = with lib.maintainers; [ khaser ];
59 };
60}