summaryrefslogtreecommitdiff
path: root/sci-ml/datasets
diff options
context:
space:
mode:
Diffstat (limited to 'sci-ml/datasets')
-rw-r--r--sci-ml/datasets/Manifest4
-rw-r--r--sci-ml/datasets/datasets-2.21.0-r2.ebuild152
-rw-r--r--sci-ml/datasets/files/datasets-2.21.0-tests.patch22
-rw-r--r--sci-ml/datasets/metadata.xml12
4 files changed, 190 insertions, 0 deletions
diff --git a/sci-ml/datasets/Manifest b/sci-ml/datasets/Manifest
new file mode 100644
index 000000000000..38d95f43d5d5
--- /dev/null
+++ b/sci-ml/datasets/Manifest
@@ -0,0 +1,4 @@
+AUX datasets-2.21.0-tests.patch 721 BLAKE2B cf85b02a4eb5da27e52bf819f00e333d6e3fb3fb0b9f7279afff24e3fddf76fcd46cb5e06d29b4780d0ce6b48c9378df301c70f6339e2f2898560219ebab4210 SHA512 43cdc5af6ba3fff3e7641006be6d8e10a5ad00136c1cf137628456019cccbd3d05b888b7eeec1cb8cd42d5ce52091b2a66d32a5b41ff2193658c4257900ea45c
+DIST datasets-2.21.0.gh.tar.gz 2198480 BLAKE2B 41a5e82013d26644db4f52b16728cee31c6ff27995b8a9b2ddef1512fcda5e9386e47f6726303fec64d5ed7e40432583a6ddcc2bdfbb76096dce5f23b0540149 SHA512 f4193e29505300f98ec026b1ed052ffd3d43ae05a9b191bb56105d703ba2e44752e97c0eeb36dd1b2df6499662915591ab850cdec5248af8c7c5b5a003437c5c
+EBUILD datasets-2.21.0-r2.ebuild 7922 BLAKE2B 19e99c9b6f1aa65ce999b84287f289140307992c7345ab7769cfe6b1b2b4032175c0c3d09067ea52b416f9aaa3ef3a1e69d68353a81e8accd56c6ada9b6eb7df SHA512 ab58615e32224d054341219c970fc37fae9e7ce9439dc4c91223cd5c61f8063d77c96f0467a1196e07ea5c94b617347222aa646cd6fc8fae764119da726471bc
+MISC metadata.xml 379 BLAKE2B 48ebb9e7bfa8b58b0d15b82c4146def465e08cf3212ab4af04129d09c153b67b00d0fa05b94d6af54f643ec3a202f2335d3254b966f49d1394d3c7b9e5da56a5 SHA512 99560decfaa0e438980f372d99257695e9ca9585167d9aba091e0b775c2f8384657ddc017841c8f06f8b568017a54fb9e31da736f3c875da717e154cdce876d1
diff --git a/sci-ml/datasets/datasets-2.21.0-r2.ebuild b/sci-ml/datasets/datasets-2.21.0-r2.ebuild
new file mode 100644
index 000000000000..6c7f8faeefb7
--- /dev/null
+++ b/sci-ml/datasets/datasets-2.21.0-r2.ebuild
@@ -0,0 +1,152 @@
+# 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"
+
+IUSE="test"
+
+RDEPEND="
+ ${PYTHON_DEPS}
+ sci-ml/pytorch[${PYTHON_SINGLE_USEDEP}]
+ sci-ml/caffe2[${PYTHON_SINGLE_USEDEP},numpy]
+ $(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}]
+ sci-ml/huggingface_hub[${PYTHON_USEDEP}]
+ ')
+"
+DEPEND="${RDEPEND}"
+BDEPEND="test? (
+ $(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-libs/jiwer[${PYTHON_USEDEP}]
+ sci-libs/seqeval[${PYTHON_USEDEP}]
+ ')
+ sci-ml/torchvision[${PYTHON_SINGLE_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/test_upstream_hub.py
+ tests/packaged_modules/test_spark.py
+ tests/test_load.py
+ )
+
+ local EPYTEST_DESELECT=(
+ "tests/features/test_audio.py::test_dataset_with_audio_feature_map_undecoded"
+ "tests/features/test_audio.py::test_dataset_with_audio_feature_undecoded"
+ "tests/features/test_audio.py::test_formatted_dataset_with_audio_feature_undecoded"
+ "tests/io/test_parquet.py::test_parquet_read_geoparquet"
+ "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_arrow_dataset.py::TaskTemplatesTest::test_task_automatic_speech_recognition"
+ "tests/test_data_files.py::test_DataFilesDict_from_patterns_locally_or_remote_hashing"
+ "tests/test_data_files.py::test_DataFilesList_from_patterns_locally_with_extra_files"
+ "tests/test_distributed.py::test_torch_distributed_run"
+ "tests/test_exceptions.py::test_error_deprecated"
+ "tests/test_file_utils.py::TestxPath::test_xpath_rglob"
+ "tests/test_file_utils.py::TestxPath::test_xpath_glob"
+ "tests/test_fingerprint.py::HashingTest::test_hash_torch_compiled_module"
+ "tests/test_fingerprint.py::HashingTest::test_hash_torch_generator"
+ "tests/test_fingerprint.py::HashingTest::test_hash_torch_tensor"
+ "tests/test_fingerprint.py::HashingTest::test_set_doesnt_depend_on_order"
+ "tests/test_fingerprint.py::HashingTest::test_set_stable"
+ "tests/test_fingerprint.py::RecurseHashTest::test_hash_ignores_line_definition_of_function"
+ "tests/test_fingerprint.py::RecurseHashTest::test_hash_ipython_function"
+ "tests/test_fingerprint.py::test_move_script_doesnt_change_hash"
+ "tests/test_fingerprint.py::TokenizersHashTest::test_hash_regex"
+ "tests/test_fingerprint.py::TokenizersHashTest::test_hash_tokenizer"
+ "tests/test_fingerprint.py::TokenizersHashTest::test_hash_tokenizer_with_cache"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_natural_questions/default@19ba7767b174ad046a84f46af056517a3910ee57"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wiki40b/en@7b21a2e64b90323b2d3d1b81aa349bb4bc76d9bf"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wiki_dpr/psgs_w100.multiset.no_index@b24a417d802a583f8922946c1c75210290e93108"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wiki_dpr/psgs_w100.nq.compressed@b24a417d802a583f8922946c1c75210290e93108"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wiki_dpr/psgs_w100.nq.no_index@b24a417d802a583f8922946c1c75210290e93108"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wikipedia/20220301.de@4d013bdd32c475c8536aae00a56efc774f061649"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wikipedia/20220301.en@4d013bdd32c475c8536aae00a56efc774f061649"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wikipedia/20220301.fr@4d013bdd32c475c8536aae00a56efc774f061649"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wikipedia/20220301.frr@4d013bdd32c475c8536aae00a56efc774f061649"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wikipedia/20220301.it@4d013bdd32c475c8536aae00a56efc774f061649"
+ "tests/test_hf_gcp.py::TestDatasetOnHfGcp::test_dataset_info_available_wikipedia/20220301.simple@4d013bdd32c475c8536aae00a56efc774f061649"
+ "tests/test_hf_gcp.py::test_as_dataset_from_hf_gcs"
+ "tests/test_hf_gcp.py::test_as_streaming_dataset_from_hf_gcs"
+ "tests/test_hub.py::test_convert_to_parquet"
+ "tests/test_hub.py::test_delete_from_hub"
+ "tests/test_iterable_dataset.py::test_iterable_dataset_from_file"
+ "tests/test_iterable_dataset.py::test_iterable_dataset_from_hub_torch_dataloader_parallel"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_bertscore"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_bleurt"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_chrf"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_code_eval"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_competition_math"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_coval"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_cuad"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_f1"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_frugalscore"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_glue"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_google_bleu"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_mauve"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_mean_iou"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_meteor"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_mse"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_precision"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_recall"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_roc_auc"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_rouge"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_sacrebleu"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_sari"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_spearmanr"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_super_glue"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_ter"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_wiki_split"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_xnli"
+ "tests/test_metric_common.py::LocalMetricTest::test_load_metric_xtreme_s"
+ "tests/test_offline_util.py::test_offline_with_timeout"
+ )
+ distutils-r1_src_test
+}
diff --git a/sci-ml/datasets/files/datasets-2.21.0-tests.patch b/sci-ml/datasets/files/datasets-2.21.0-tests.patch
new file mode 100644
index 000000000000..0a55459db109
--- /dev/null
+++ b/sci-ml/datasets/files/datasets-2.21.0-tests.patch
@@ -0,0 +1,22 @@
+--- 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",
+ ],
+--- a/tests/packaged_modules/test_audiofolder.py 2023-05-06 14:00:39.560876163 +0200
++++ b/tests/packaged_modules/test_audiofolder.py 2023-05-06 14:01:26.005212423 +0200
+@@ -1,9 +1,8 @@
+ import shutil
+ import textwrap
+
+ import numpy as np
+ import pytest
+-import soundfile as sf
+
+ from datasets import Audio, ClassLabel, Features, Value
+ from datasets.builder import InvalidConfigName
diff --git a/sci-ml/datasets/metadata.xml b/sci-ml/datasets/metadata.xml
new file mode 100644
index 000000000000..94c112402049
--- /dev/null
+++ b/sci-ml/datasets/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">huggingface/datasets</remote-id>
+ <remote-id type="pypi">datasets</remote-id>
+ </upstream>
+</pkgmetadata>