at master 1.2 kB view raw
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 postPatch = '' 30 substituteInPlace lime/tests/test_scikit_image.py \ 31 --replace-fail "random_seed" "rng" 32 ''; 33 34 propagatedBuildInputs = [ 35 matplotlib 36 numpy 37 scipy 38 tqdm 39 scikit-learn 40 scikit-image 41 ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 disabledTestPaths = [ 46 # touches network 47 "lime/tests/test_lime_text.py" 48 ]; 49 50 pythonImportsCheck = [ 51 "lime.exceptions" 52 "lime.explanation" 53 "lime.lime_base" 54 "lime.lime_image" 55 "lime.lime_text" 56 ]; 57 58 meta = { 59 description = "Local Interpretable Model-Agnostic Explanations for machine learning classifiers"; 60 homepage = "https://github.com/marcotcr/lime"; 61 changelog = "https://github.com/marcotcr/lime/releases/tag/${version}"; 62 license = lib.licenses.bsd2; 63 maintainers = with lib.maintainers; [ khaser ]; 64 }; 65}