Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 pythonOlder, 5 fetchFromGitHub, 6 7 # build-system 8 setuptools, 9 10 # dependencies 11 numpy, 12 scikit-learn, 13 termcolor, 14 tqdm, 15 pandas, 16 17 # test dependencies 18 datasets, 19 fasttext, 20 hypothesis, 21 keras, 22 matplotlib, 23 pytestCheckHook, 24 pytest-lazy-fixture, 25 skorch, 26 tensorflow, 27 torch, 28 torchvision, 29 wget, 30}: 31 32buildPythonPackage rec { 33 pname = "cleanlab"; 34 version = "2.6.6"; 35 pyproject = true; 36 37 disabled = pythonOlder "3.8"; 38 39 src = fetchFromGitHub { 40 owner = "cleanlab"; 41 repo = "cleanlab"; 42 rev = "refs/tags/v${version}"; 43 hash = "sha256-08ePFTCRuggr4hTCfr/gbzMhLozz4KCywhPFSKYDNng="; 44 }; 45 46 build-system = [ setuptools ]; 47 48 dependencies = [ 49 numpy 50 scikit-learn 51 termcolor 52 tqdm 53 pandas 54 ]; 55 56 # This is ONLY turned off when we have testing enabled. 57 # The reason we do this is because of duplicate packages in the enclosure 58 # when using the packages in nativeCheckInputs. 59 # Affected packages: grpcio protobuf tensorboard tensorboard-plugin-profile 60 catchConflicts = (!doCheck); 61 doCheck = true; 62 63 nativeCheckInputs = [ 64 datasets 65 fasttext 66 hypothesis 67 keras 68 matplotlib 69 pytestCheckHook 70 pytest-lazy-fixture 71 skorch 72 tensorflow 73 torch 74 torchvision 75 wget 76 ]; 77 78 disabledTests = [ 79 # Requires the datasets we prevent from downloading 80 "test_create_imagelab" 81 ]; 82 83 disabledTestPaths = [ 84 # Requires internet 85 "tests/test_dataset.py" 86 # Requires the datasets we just prevented from downloading 87 "tests/datalab/test_cleanvision_integration.py" 88 # Fails because of issues with the keras derivation 89 "tests/test_frameworks.py" 90 ]; 91 92 meta = { 93 description = "Standard data-centric AI package for data quality and machine learning with messy, real-world data and labels"; 94 homepage = "https://github.com/cleanlab/cleanlab"; 95 changelog = "https://github.com/cleanlab/cleanlab/releases/tag/v${version}"; 96 license = lib.licenses.agpl3Only; 97 maintainers = with lib.maintainers; [ happysalada ]; 98 }; 99}