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