2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, scikit-learn
|
|
|
|
, termcolor
|
|
|
|
, tqdm
|
|
|
|
, pandas
|
2023-11-16 04:20:00 +00:00
|
|
|
, setuptools
|
2023-07-15 17:15:38 +00:00
|
|
|
# test dependencies
|
2023-11-16 04:20:00 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pytest-lazy-fixture
|
2023-07-15 17:15:38 +00:00
|
|
|
, tensorflow
|
|
|
|
, torch
|
|
|
|
, datasets
|
|
|
|
, torchvision
|
|
|
|
, keras
|
|
|
|
, fasttext
|
2023-11-16 04:20:00 +00:00
|
|
|
, hypothesis
|
|
|
|
, wget
|
|
|
|
, matplotlib
|
|
|
|
, skorch
|
2023-07-15 17:15:38 +00:00
|
|
|
}:
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cleanlab";
|
|
|
|
version = "2.5.0";
|
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.7";
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cleanlab";
|
|
|
|
repo = pname;
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-5XQQVrhjpvjwtFM79DqttObmw/GQLkMQVXb5jhiC8e0=";
|
2023-07-15 17:15:38 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
scikit-learn
|
|
|
|
termcolor
|
|
|
|
tqdm
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# 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;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-lazy-fixture
|
2023-07-15 17:15:38 +00:00
|
|
|
tensorflow
|
|
|
|
torch
|
|
|
|
datasets
|
|
|
|
torchvision
|
|
|
|
keras
|
|
|
|
fasttext
|
2023-11-16 04:20:00 +00:00
|
|
|
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"
|
2023-07-15 17:15:38 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|