2020-09-25 04:45:31 +00:00
|
|
|
{ lib
|
2022-04-27 09:35:20 +00:00
|
|
|
, aiohttp
|
2020-09-25 04:45:31 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, dill
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
2022-11-21 17:40:18 +00:00
|
|
|
, fetchpatch
|
2021-03-19 17:17:44 +00:00
|
|
|
, fsspec
|
|
|
|
, huggingface-hub
|
2022-04-27 09:35:20 +00:00
|
|
|
, importlib-metadata
|
2020-11-15 13:44:38 +00:00
|
|
|
, multiprocess
|
2020-09-25 04:45:31 +00:00
|
|
|
, numpy
|
2022-04-27 09:35:20 +00:00
|
|
|
, packaging
|
2020-09-25 04:45:31 +00:00
|
|
|
, pandas
|
|
|
|
, pyarrow
|
2022-04-27 09:35:20 +00:00
|
|
|
, pythonOlder
|
2020-09-25 04:45:31 +00:00
|
|
|
, requests
|
2022-04-27 09:35:20 +00:00
|
|
|
, responses
|
2020-09-25 04:45:31 +00:00
|
|
|
, tqdm
|
|
|
|
, xxhash
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "datasets";
|
2023-03-04 12:14:45 +00:00
|
|
|
version = "2.10.1";
|
2022-04-27 09:35:20 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "huggingface";
|
|
|
|
repo = pname;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-CLzEJchNKmwfN1ZRQfCFusXDSgvHilwnM0KkcX822MI=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "responses<0.19" "responses"
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-04-27 09:35:20 +00:00
|
|
|
aiohttp
|
2020-09-25 04:45:31 +00:00
|
|
|
dill
|
2021-03-19 17:17:44 +00:00
|
|
|
fsspec
|
|
|
|
huggingface-hub
|
2020-11-15 13:44:38 +00:00
|
|
|
multiprocess
|
2020-09-25 04:45:31 +00:00
|
|
|
numpy
|
2022-04-27 09:35:20 +00:00
|
|
|
packaging
|
2020-09-25 04:45:31 +00:00
|
|
|
pandas
|
|
|
|
pyarrow
|
|
|
|
requests
|
2022-04-27 09:35:20 +00:00
|
|
|
responses
|
2020-09-25 04:45:31 +00:00
|
|
|
tqdm
|
|
|
|
xxhash
|
2022-04-27 09:35:20 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
importlib-metadata
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# Tests require pervasive internet access.
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
# Module import will attempt to create a cache directory.
|
|
|
|
postFixup = "export HF_MODULES_CACHE=$TMPDIR";
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"datasets"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-04-27 09:35:20 +00:00
|
|
|
description = "Open-access datasets and evaluation metrics for natural language processing";
|
2020-09-25 04:45:31 +00:00
|
|
|
homepage = "https://github.com/huggingface/datasets";
|
|
|
|
changelog = "https://github.com/huggingface/datasets/releases/tag/${version}";
|
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.unix;
|
2021-09-18 10:52:07 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
}
|