summaryrefslogtreecommitdiff
path: root/sci-ml/datasets
diff options
context:
space:
mode:
Diffstat (limited to 'sci-ml/datasets')
-rw-r--r--sci-ml/datasets/Manifest3
-rw-r--r--sci-ml/datasets/datasets-3.0.2.ebuild89
-rw-r--r--sci-ml/datasets/files/datasets-3.0.2-tests.patch10
3 files changed, 102 insertions, 0 deletions
diff --git a/sci-ml/datasets/Manifest b/sci-ml/datasets/Manifest
index 43f2adfe2432..78622f5ffaaf 100644
--- a/sci-ml/datasets/Manifest
+++ b/sci-ml/datasets/Manifest
@@ -1,4 +1,7 @@
AUX datasets-2.21.0-tests.patch 721 BLAKE2B cf85b02a4eb5da27e52bf819f00e333d6e3fb3fb0b9f7279afff24e3fddf76fcd46cb5e06d29b4780d0ce6b48c9378df301c70f6339e2f2898560219ebab4210 SHA512 43cdc5af6ba3fff3e7641006be6d8e10a5ad00136c1cf137628456019cccbd3d05b888b7eeec1cb8cd42d5ce52091b2a66d32a5b41ff2193658c4257900ea45c
+AUX datasets-3.0.2-tests.patch 335 BLAKE2B b7499d85cc8cf09a2cb9b58aa0c7ab16c1bc700812c767465979cc59b11d63d05f52422ae731317f373314164715079f6fa81b30d47e3058ce88d6539d049789 SHA512 3f533ab765362ea6a1bc7a1766d332f5bc53e342cbb684061eaed58ef415f715c003f210b73a8b0ca20245d8e1f60517191829fb64feb53101211a9f81542e5a
DIST datasets-2.21.0.gh.tar.gz 2198480 BLAKE2B 41a5e82013d26644db4f52b16728cee31c6ff27995b8a9b2ddef1512fcda5e9386e47f6726303fec64d5ed7e40432583a6ddcc2bdfbb76096dce5f23b0540149 SHA512 f4193e29505300f98ec026b1ed052ffd3d43ae05a9b191bb56105d703ba2e44752e97c0eeb36dd1b2df6499662915591ab850cdec5248af8c7c5b5a003437c5c
+DIST datasets-3.0.2.gh.tar.gz 1867037 BLAKE2B 92475ac566bd825c542dbd3e138c83e1733e6d1137f30a2cfd8f82f7dd54ed78c0566aa766182625e8787413be18f5a0c0c0a289b5823fa9112dcb2876074b7e SHA512 aa55dd2f53df7217c30999f759c76a13d78851233bce4df9b1ad85081e101a7280e905822160874d24d15ea1e1a5ecee1bae9cc66785e89af45ad16dd0339595
EBUILD datasets-2.21.0-r5.ebuild 7918 BLAKE2B 70dd0e2163e4410d4ca9ea107e9b08566928c3ccdf5d4d7cde52bffea0f734e8e4424db33510f6567632bded1c7f1799507c2581a8caab2faa3b9dad55e7130e SHA512 7f8cb8d5ecfae17077a94656a7b40a10cf657b991cc4d60302bb0b9cf3691dc5aa8088642e61d2ea91013ecdd4766d6470cd3d9104b51f5d585d385df7955314
+EBUILD datasets-3.0.2.ebuild 2612 BLAKE2B 34d17c391895a5623d2bff1a99f8a25ed804057a82a1483593a05d47149e0408d95a28e40eb9e0812c690cb0cc86c2d8d7cb4a72329013fcc15a83801e1cef6b SHA512 3b1ce36cba9348756d5868449d2fe0f1fcdfb4c4569f2c87398bcd3ba1c200e8e519b1b4f00c0016235a1466e212e5b09108b6a167b0cfc6910f83e676156444
MISC metadata.xml 379 BLAKE2B 48ebb9e7bfa8b58b0d15b82c4146def465e08cf3212ab4af04129d09c153b67b00d0fa05b94d6af54f643ec3a202f2335d3254b966f49d1394d3c7b9e5da56a5 SHA512 99560decfaa0e438980f372d99257695e9ca9585167d9aba091e0b775c2f8384657ddc017841c8f06f8b568017a54fb9e31da736f3c875da717e154cdce876d1
diff --git a/sci-ml/datasets/datasets-3.0.2.ebuild b/sci-ml/datasets/datasets-3.0.2.ebuild
new file mode 100644
index 000000000000..051a56ca8680
--- /dev/null
+++ b/sci-ml/datasets/datasets-3.0.2.ebuild
@@ -0,0 +1,89 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_SINGLE_IMPL=1
+inherit distutils-r1
+
+DESCRIPTION="Access and share datasets for Audio, Computer Vision, and NLP tasks"
+HOMEPAGE="https://pypi.org/project/datasets/"
+SRC_URI="https://github.com/huggingface/${PN}/archive/refs/tags/${PV}.tar.gz
+ -> ${P}.gh.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ sci-ml/caffe2[${PYTHON_SINGLE_USEDEP},numpy]
+ sci-ml/huggingface_hub[${PYTHON_SINGLE_USEDEP}]
+ sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/aiohttp[${PYTHON_USEDEP}]
+ dev-python/dill[${PYTHON_USEDEP}]
+ dev-python/filelock[${PYTHON_USEDEP}]
+ dev-python/fsspec[${PYTHON_USEDEP}]
+ dev-python/multiprocess[${PYTHON_USEDEP}]
+ dev-python/numpy[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/pandas[${PYTHON_USEDEP}]
+ dev-python/pyarrow[${PYTHON_USEDEP},parquet,snappy]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/requests[${PYTHON_USEDEP}]
+ dev-python/tqdm[${PYTHON_USEDEP}]
+ dev-python/xxhash[${PYTHON_USEDEP}]
+ ')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="test? (
+ sci-ml/torchvision[${PYTHON_SINGLE_USEDEP}]
+ $(python_gen_cond_dep '
+ dev-python/absl-py[${PYTHON_USEDEP}]
+ dev-python/decorator[${PYTHON_USEDEP}]
+ dev-python/pytest-datadir[${PYTHON_USEDEP}]
+ dev-python/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/sqlalchemy[${PYTHON_USEDEP}]
+ dev-python/zstandard[${PYTHON_USEDEP}]
+ sci-ml/jiwer[${PYTHON_USEDEP}]
+ sci-ml/seqeval[${PYTHON_USEDEP}]
+ ')
+)"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-tests.patch
+)
+
+distutils_enable_tests pytest
+
+src_prepare() {
+ distutils-r1_src_prepare
+ sed -i -e \
+ "/pyarrow_hotfix/d" \
+ src/datasets/features/features.py || die
+}
+
+src_test() {
+ local EPYTEST_IGNORE=(
+ tests/features/test_audio.py
+ tests/test_fingerprint.py
+ tests/packaged_modules/test_audiofolder.py
+ tests/packaged_modules/test_spark.py
+ tests/test_iterable_dataset.py
+ )
+
+ local EPYTEST_DESELECT=(
+ tests/packaged_modules/test_cache.py::test_cache_multi_configs
+ tests/packaged_modules/test_cache.py::test_cache_single_config
+ tests/test_arrow_dataset.py::BaseDatasetTest::test_filter_caching_on_disk
+ tests/test_arrow_dataset.py::BaseDatasetTest::test_map_caching_on_disk
+ tests/test_distributed.py::test_torch_distributed_run
+ tests/test_file_utils.py::TestxPath::test_xpath_rglob
+ tests/test_file_utils.py::TestxPath::test_xpath_glob
+ tests/test_hub.py::test_convert_to_parquet
+ )
+ distutils-r1_src_test
+}
diff --git a/sci-ml/datasets/files/datasets-3.0.2-tests.patch b/sci-ml/datasets/files/datasets-3.0.2-tests.patch
new file mode 100644
index 000000000000..5ff3d6c85c57
--- /dev/null
+++ b/sci-ml/datasets/files/datasets-3.0.2-tests.patch
@@ -0,0 +1,10 @@
+--- a/tests/test_arrow_dataset.py 2024-02-20 21:53:24.248470991 +0100
++++ b/tests/test_arrow_dataset.py 2024-02-20 21:53:29.441804737 +0100
+@@ -4131,7 +4131,6 @@
+ [
+ "relative/path",
+ "/absolute/path",
+- "s3://bucket/relative/path",
+ "hdfs://relative/path",
+ "hdfs:///absolute/path",
+ ],