Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 72 lines 1.4 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 pythonOlder, 6 setuptools, 7 joblib, 8 keras, 9 numpy, 10 pandas, 11 scikit-learn, 12 scipy, 13 tensorflow, 14 threadpoolctl, 15 pytestCheckHook, 16}: 17 18buildPythonPackage rec { 19 pname = "imbalanced-learn"; 20 version = "0.12.4"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.8"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-gVO6OF0pawfZfgkBomJKhsBrSMlML5LaOlNUgnaXt6M="; 28 }; 29 30 nativeBuildInputs = [ setuptools ]; 31 32 propagatedBuildInputs = [ 33 joblib 34 numpy 35 scikit-learn 36 scipy 37 threadpoolctl 38 ]; 39 40 optional-dependencies = { 41 optional = [ 42 keras 43 pandas 44 tensorflow 45 ]; 46 }; 47 48 pythonImportsCheck = [ "imblearn" ]; 49 50 nativeCheckInputs = [ 51 pytestCheckHook 52 pandas 53 ]; 54 55 preCheck = '' 56 export HOME=$TMPDIR 57 ''; 58 59 disabledTestPaths = [ 60 # require tensorflow and keras, but we don't want to 61 # add them to nativeCheckInputs just for this tests 62 "imblearn/keras/_generator.py" 63 ]; 64 65 meta = with lib; { 66 description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; 67 homepage = "https://github.com/scikit-learn-contrib/imbalanced-learn"; 68 changelog = "https://github.com/scikit-learn-contrib/imbalanced-learn/releases/tag/${version}"; 69 license = licenses.mit; 70 maintainers = [ maintainers.rmcgibbo ]; 71 }; 72}