Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 35 lines 1.0 kB view raw
1{ stdenv, buildPythonPackage, fetchPypi, isPy27 2, nose 3, pandas 4, pytest 5, scikitlearn 6, tensorflow 7}: 8 9buildPythonPackage rec { 10 pname = "imbalanced-learn"; 11 version = "0.5.0"; 12 disabled = isPy27; # scikit-learn>=0.21 doesn't work on python2 13 14 src = fetchPypi { 15 inherit pname version; 16 sha256 = "1m8r055mvkws0s449s1dyrkgricls6basnszwbwqwrw6g19n1xsx"; 17 }; 18 19 propagatedBuildInputs = [ scikitlearn ]; 20 checkInputs = [ nose pytest pandas ]; 21 checkPhase = '' 22 export HOME=$TMPDIR 23 # skip some tests that fail because of minimal rounding errors 24 # or very large dependencies (keras + tensorflow) 25 py.test imblearn -k 'not estimator \ 26 and not classification \ 27 and not _generator' 28 ''; 29 30 meta = with stdenv.lib; { 31 description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; 32 homepage = https://github.com/scikit-learn-contrib/imbalanced-learn; 33 license = licenses.mit; 34 }; 35}