1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 datasets,
7 dill,
8 fsspec,
9 huggingface-hub,
10 importlib-metadata,
11 multiprocess,
12 numpy,
13 packaging,
14 pandas,
15 requests,
16 setuptools,
17 tqdm,
18 xxhash,
19}:
20
21buildPythonPackage rec {
22 pname = "evaluate";
23 version = "0.4.2";
24 pyproject = true;
25
26 disabled = pythonOlder "3.7";
27
28 src = fetchFromGitHub {
29 owner = "huggingface";
30 repo = "evaluate";
31 rev = "refs/tags/v${version}";
32 hash = "sha256-CGBluY7wFr+RdUW4QTUN18z1WKAB104ayrkzzPZHZ/w=";
33 };
34
35 build-system = [ setuptools ];
36
37 dependencies = [
38 datasets
39 numpy
40 dill
41 pandas
42 requests
43 tqdm
44 xxhash
45 multiprocess
46 fsspec
47 huggingface-hub
48 packaging
49 ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
50
51 # most tests require internet access.
52 doCheck = false;
53
54 pythonImportsCheck = [ "evaluate" ];
55
56 meta = with lib; {
57 homepage = "https://huggingface.co/docs/evaluate/index";
58 description = "Easily evaluate machine learning models and datasets";
59 changelog = "https://github.com/huggingface/evaluate/releases/tag/v${version}";
60 license = licenses.asl20;
61 maintainers = with maintainers; [ bcdarwin ];
62 mainProgram = "evaluate-cli";
63 };
64}