about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/cleanlab/default.nix
blob: fdaf384262b8e6012b8e97e80e970e3e7a463082 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, scikit-learn
, termcolor
, tqdm
, pandas
, setuptools
# test dependencies
, pytestCheckHook
, pytest-lazy-fixture
, tensorflow
, torch
, datasets
, torchvision
, keras
, fasttext
, hypothesis
, wget
, matplotlib
, skorch
}:

buildPythonPackage rec {
  pname = "cleanlab";
  version = "2.5.0";
  pyproject = true;
  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "cleanlab";
    repo = pname;
    rev = "refs/tags/v${version}";
    hash = "sha256-5XQQVrhjpvjwtFM79DqttObmw/GQLkMQVXb5jhiC8e0=";
  };

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = [
    scikit-learn
    termcolor
    tqdm
    pandas
  ];

  # This is ONLY turned off when we have testing enabled.
  # The reason we do this is because of duplicate packages in the enclosure
  # when using the packages in nativeCheckInputs.
  # Affected packages: grpcio protobuf tensorboard tensorboard-plugin-profile
  catchConflicts = (!doCheck);
  doCheck = true;

  nativeCheckInputs = [
    pytestCheckHook
    pytest-lazy-fixture
    tensorflow
    torch
    datasets
    torchvision
    keras
    fasttext
    hypothesis
    wget
    matplotlib
    skorch
  ];

  disabledTests = [
    # Requires the datasets we prevent from downloading
    "test_create_imagelab"
  ];

  disabledTestPaths = [
    # Requires internet
    "tests/test_dataset.py"
    # Requires the datasets we just prevented from downloading
    "tests/datalab/test_cleanvision_integration.py"
  ];

  meta = with lib; {
    description = "The standard data-centric AI package for data quality and machine learning with messy, real-world data and labels.";
    homepage = "https://github.com/cleanlab/cleanlab";
    changelog = "https://github.com/cleanlab/cleanlab/releases/tag/v${version}";
    license = licenses.agpl3Only;
    maintainers = with maintainers; [ happysalada ];
  };
}