2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
|
|
|
datasets,
|
|
|
|
dill,
|
|
|
|
fsspec,
|
|
|
|
huggingface-hub,
|
|
|
|
importlib-metadata,
|
|
|
|
multiprocess,
|
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
pandas,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
tqdm,
|
|
|
|
xxhash,
|
2023-03-08 16:32:21 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "evaluate";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "0.4.2";
|
|
|
|
pyproject = true;
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "huggingface";
|
2024-06-05 15:53:02 +00:00
|
|
|
repo = "evaluate";
|
2023-03-08 16:32:21 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
hash = "sha256-CGBluY7wFr+RdUW4QTUN18z1WKAB104ayrkzzPZHZ/w=";
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
dependencies = [
|
2023-03-08 16:32:21 +00:00
|
|
|
datasets
|
|
|
|
numpy
|
|
|
|
dill
|
|
|
|
pandas
|
|
|
|
requests
|
|
|
|
tqdm
|
|
|
|
xxhash
|
|
|
|
multiprocess
|
|
|
|
fsspec
|
|
|
|
huggingface-hub
|
|
|
|
packaging
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
# most tests require internet access.
|
|
|
|
doCheck = false;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "evaluate" ];
|
2023-03-08 16:32:21 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://huggingface.co/docs/evaluate/index";
|
|
|
|
description = "Easily evaluate machine learning models and datasets";
|
|
|
|
changelog = "https://github.com/huggingface/evaluate/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
2023-03-15 16:39:30 +00:00
|
|
|
mainProgram = "evaluate-cli";
|
2023-03-08 16:32:21 +00:00
|
|
|
};
|
|
|
|
}
|