[gentoo-commits] repo/gentoo:master commit in: sci-libs/datasets/, sci-libs/datasets/files/
commit: ca4289c9b372e31848e4f95ed8f7564406ab797d Author: Alfredo Tupone gentoo org> AuthorDate: Thu Feb 22 18:36:24 2024 + Commit: Alfredo Tupone gentoo org> CommitDate: Thu Feb 22 18:37:11 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ca4289c9 sci-libs/datasets: drop test that need network Closes: https://bugs.gentoo.org/925220 Signed-off-by: Alfredo Tupone gentoo.org> sci-libs/datasets/datasets-2.17.1.ebuild | 1 - .../datasets/files/datasets-2.14.4-tests.patch | 232 .../datasets/files/datasets-2.17.1-tests.patch | 240 + 3 files changed, 240 insertions(+), 233 deletions(-) diff --git a/sci-libs/datasets/datasets-2.17.1.ebuild b/sci-libs/datasets/datasets-2.17.1.ebuild index 9b6295db1a0e..65e38b9dbef7 100644 --- a/sci-libs/datasets/datasets-2.17.1.ebuild +++ b/sci-libs/datasets/datasets-2.17.1.ebuild @@ -57,7 +57,6 @@ BDEPEND="test? ( )" PATCHES=( - "${FILESDIR}"/${PN}-2.14.4-tests.patch "${FILESDIR}"/${P}-tests.patch ) diff --git a/sci-libs/datasets/files/datasets-2.14.4-tests.patch b/sci-libs/datasets/files/datasets-2.14.4-tests.patch deleted file mode 100644 index b9791c04e8e0.. --- a/sci-libs/datasets/files/datasets-2.14.4-tests.patch +++ /dev/null @@ -1,232 +0,0 @@ a/tests/test_metric_common.py 2023-05-04 18:48:48.550861318 +0200 -+++ b/tests/test_metric_common.py 2023-05-04 18:50:25.787364577 +0200 -@@ -93,6 +93,7 @@ - INTENSIVE_CALLS_PATCHER = {} - metric_name = None - -+@pytest.mark.skip(reason="disabling, depends on bert_score, bleurt, math_equivalence, coval, nltk, faiss, mauve, rouge_score, sacrebleu, sacremoses ...") - @pytest.mark.filterwarnings("ignore:metric_module_factory is deprecated:FutureWarning") - @pytest.mark.filterwarnings("ignore:load_metric is deprecated:FutureWarning") - def test_load_metric(self, metric_name): a/tests/test_distributed.py2023-05-04 19:43:09.861275030 +0200 -+++ b/tests/test_distributed.py2023-05-04 19:44:17.608326722 +0200 -@@ -74,6 +74,7 @@ - split_dataset_by_node(full_ds.shuffle(), rank=0, world_size=world_size) - - -+@pytest.mark.skip(reason="require distributed torch") - @pytest.mark.parametrize("streaming", [False, True]) - @require_torch - @pytest.mark.skipif(os.name == "nt", reason="execute_subprocess_async doesn't support windows") -@@ -95,6 +96,7 @@ - execute_subprocess_async(cmd, env=os.environ.copy()) - - -+@pytest.mark.skip(reason="require distributed torch") - @pytest.mark.parametrize( - "nproc_per_node, num_workers", - [ a/tests/utils.py 2023-05-06 08:43:16.251987543 +0200 -+++ b/tests/utils.py 2023-05-06 08:44:24.467952870 +0200 -@@ -50,8 +50,8 @@ - # Audio - require_sndfile = pytest.mark.skipif( - # On Windows and OS X, soundfile installs sndfile --find_spec("soundfile") is None or version.parse(importlib.metadata.version("soundfile")) < version.parse("0.12.0"), --reason="test requires sndfile>=0.12.1: 'pip install \"soundfile>=0.12.1\"'; ", -+True, -+reason="test requires librosa", - ) - - # Beam a/tests/features/test_audio.py 2023-05-06 09:03:58.680108142 +0200 -+++ a/tests/features/test_audio.py 2023-05-06 09:05:50.463407967 +0200 -@@ -57,6 +57,7 @@ - assert features.arrow_schema == pa.schema({"sequence_of_audios": pa.list_(Audio().pa_type)}) - - -+@pytest.mark.skip(reason="require librosa") - @pytest.mark.parametrize( - "build_example", - [ -@@ -81,6 +82,7 @@ - assert decoded_example.keys() == {"path", "array", "sampling_rate"} - - -+@pytest.mark.skip(reason="require librosa") - @pytest.mark.parametrize( - "build_example", - [ -@@ -148,6 +149,7 @@ - assert decoded_example["sampling_rate"] == 48000 - - -+@pytest.mark.skip(reason="require librosa") - @pytest.mark.parametrize("sampling_rate", [16_000, 48_000]) - def test_audio_decode_example_pcm(shared_datadir, sampling_rate): - audio_path = str(shared_datadir / "test_audio_16000.pcm") -@@ -414,6 +417,7 @@ - assert column[0]["sampling_rate"] == 16000 - - -+@pytest.mark.skip(reason="require librosa") - @pytest.mark.parametrize( - "build_data", - [ -@@ -438,6 +442,7 @@ - assert item["audio"].keys() == {"path", "array", "sampling_rate"} - - -+@pytest.mark.skip(reason="require librosa") - def test_dataset_concatenate_audio_features(shared_datadir): - # we use a different data structure between 1 and 2 to make sure they are compatible with each other - audio_path = str(shared_datadir / "test_audio_44100.wav") -@@ -451,6 +456,7 @@ - assert concatenated_dataset[1]["audio"]["array"].shape == dset2[0]["audio"]["array"].shape - - -+@pytest.mark.skip(reason="require librosa") - def test_dataset_concatenate_nested_audio_features(shared_datadir): - # we use a different data structure between 1 and 2 to make sure they are compatible with each
[gentoo-commits] repo/gentoo:master commit in: sci-libs/datasets/, sci-libs/datasets/files/
commit: 05e867ed4f4ffc6bcbf57160225dcce103062057 Author: Alfredo Tupone gentoo org> AuthorDate: Thu Feb 22 07:26:13 2024 + Commit: Alfredo Tupone gentoo org> CommitDate: Thu Feb 22 07:26:40 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05e867ed sci-libs/datasets: add 2.17.1, drop 2.16.0 Bug: https://bugs.gentoo.org/921090 Signed-off-by: Alfredo Tupone gentoo.org> sci-libs/datasets/Manifest | 2 +- ...tasets-2.16.0.ebuild => datasets-2.17.1.ebuild} | 8 -- .../datasets/files/datasets-2.14.4-tests.patch | 10 ...6.0-tests.patch => datasets-2.17.1-tests.patch} | 29 -- 4 files changed, 17 insertions(+), 32 deletions(-) diff --git a/sci-libs/datasets/Manifest b/sci-libs/datasets/Manifest index 0880ec7cb629..1b5292db6bf4 100644 --- a/sci-libs/datasets/Manifest +++ b/sci-libs/datasets/Manifest @@ -1 +1 @@ -DIST datasets-2.16.0.gh.tar.gz 2163874 BLAKE2B baec91a0e39fac3e07f11e352a286c0940cbc672e7233267e70d1abb64dd31bae18c55213a20fafaeaf2f60268104f294c77c9b73ddc1b289175904288a7c440 SHA512 f2a17ffab192163cfc196cc2bad0adb2ca657b5cf911f74f299b6e29eb4fcfacc377505b1857974a6b55252eedf8775a8706f9e991450c55e5d613020dc03735 +DIST datasets-2.17.1.gh.tar.gz 2168860 BLAKE2B ad7e9be7e60125d53b19b6277b6be6ae6050321e4210293a37737a345a4806d4901e9507fbf7a51c5e00a91912656d68a94e76cf70e070433beccc6e1ad54643 SHA512 43617c3d98cc3ad17fb577d6e917d164c8b6ec24740604ca281adaa2f0e5a6538633721792c9fa6621b7f1980161d8acf62dcdcdacca56e1739a8f28e3c71cdf diff --git a/sci-libs/datasets/datasets-2.16.0.ebuild b/sci-libs/datasets/datasets-2.17.1.ebuild similarity index 91% rename from sci-libs/datasets/datasets-2.16.0.ebuild rename to sci-libs/datasets/datasets-2.17.1.ebuild index a34fcaa2f89c..9b6295db1a0e 100644 --- a/sci-libs/datasets/datasets-2.16.0.ebuild +++ b/sci-libs/datasets/datasets-2.17.1.ebuild @@ -27,12 +27,16 @@ RDEPEND=" $(python_gen_cond_dep ' dev-python/absl-py[${PYTHON_USEDEP}] dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/dill[${PYTHON_USEDEP}] + dev-python/filelock[${PYTHON_USEDEP}] <=dev-python/fsspec-2023.10.0[${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}] dev-python/zstandard[${PYTHON_USEDEP}] @@ -46,7 +50,7 @@ BDEPEND="test? ( dev-python/absl-py[${PYTHON_USEDEP}] dev-python/pytest-datadir[${PYTHON_USEDEP}] dev-python/decorator[${PYTHON_USEDEP}] - =dev-python/sqlalchemy-1*[${PYTHON_USEDEP}] + dev-python/sqlalchemy[${PYTHON_USEDEP}] sci-libs/jiwer[${PYTHON_USEDEP}] sci-libs/seqeval[${PYTHON_USEDEP}] ') @@ -79,5 +83,5 @@ src_prepare() { tests/test_streaming_download_manager.py \ tests/commands/test_test.py \ tests/packaged_modules/test_cache.py \ - die + || die } diff --git a/sci-libs/datasets/files/datasets-2.14.4-tests.patch b/sci-libs/datasets/files/datasets-2.14.4-tests.patch index 5dd322309b20..b9791c04e8e0 100644 --- a/sci-libs/datasets/files/datasets-2.14.4-tests.patch +++ b/sci-libs/datasets/files/datasets-2.14.4-tests.patch @@ -8,16 +8,6 @@ @pytest.mark.filterwarnings("ignore:metric_module_factory is deprecated:FutureWarning") @pytest.mark.filterwarnings("ignore:load_metric is deprecated:FutureWarning") def test_load_metric(self, metric_name): a/tests/test_hf_gcp.py 2023-05-04 19:33:31.150825303 +0200 -+++ b/tests/test_hf_gcp.py 2023-05-04 19:40:08.401759538 +0200 -@@ -75,6 +75,7 @@ - self.assertTrue(os.path.exists(datset_info_path)) - - -+@pytest.mark.skip(reason="require apache_beam") - @pytest.mark.integration - def test_as_dataset_from_hf_gcs(tmp_path_factory): - tmp_dir = tmp_path_factory.mktemp("test_hf_gcp") / "test_wikipedia_simple" --- a/tests/test_distributed.py2023-05-04 19:43:09.861275030 +0200 +++ b/tests/test_distributed.py2023-05-04 19:44:17.608326722 +0200 @@ -74,6 +74,7 @@ diff --git a/sci-libs/datasets/files/datasets-2.16.0-tests.patch b/sci-libs/datasets/files/datasets-2.17.1-tests.patch similarity index 90% rename from sci-libs/datasets/files/datasets-2.16.0-tests.patch rename to sci-libs/datasets/files/datasets-2.17.1-tests.patch index 8cb89e824b3b..14ae50602d10 100644 --- a/sci-libs/datasets/files/datasets-2.16.0-tests.patch +++
[gentoo-commits] repo/gentoo:master commit in: sci-libs/datasets/, sci-libs/datasets/files/
commit: c05b1cf909d724d72c0ce14fd7c870ab3749677f Author: Alfredo Tupone gentoo org> AuthorDate: Wed Feb 21 11:32:18 2024 + Commit: Alfredo Tupone gentoo org> CommitDate: Wed Feb 21 11:33:05 2024 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c05b1cf9 sci-libs/datasets: add 2.16.0, drop 2.15.0 Signed-off-by: Alfredo Tupone gentoo.org> sci-libs/datasets/Manifest | 2 +- ...tasets-2.15.0.ebuild => datasets-2.16.0.ebuild} | 4 +- .../datasets/files/datasets-2.15.0-tests.patch | 46 --- .../datasets/files/datasets-2.16.0-tests.patch | 89 ++ 4 files changed, 92 insertions(+), 49 deletions(-) diff --git a/sci-libs/datasets/Manifest b/sci-libs/datasets/Manifest index 42abdebf934c..0880ec7cb629 100644 --- a/sci-libs/datasets/Manifest +++ b/sci-libs/datasets/Manifest @@ -1 +1 @@ -DIST datasets-2.15.0.gh.tar.gz 2147191 BLAKE2B eadf0133f0baa9f0469a51f28e00d3656b2b799ed1ff221ad6df39640c9777ccd46b706e46898ffa0597bc43288ee5991410d5c6d0a2cb3b814658c92d779a68 SHA512 589ca7992d58007c556558ef0889354fe34821f55e79025ea475d08c105428fe84c77c9183ec0028d8e60b25ba0ea8565bd8c6003a85bb6472d1cb4a247142e2 +DIST datasets-2.16.0.gh.tar.gz 2163874 BLAKE2B baec91a0e39fac3e07f11e352a286c0940cbc672e7233267e70d1abb64dd31bae18c55213a20fafaeaf2f60268104f294c77c9b73ddc1b289175904288a7c440 SHA512 f2a17ffab192163cfc196cc2bad0adb2ca657b5cf911f74f299b6e29eb4fcfacc377505b1857974a6b55252eedf8775a8706f9e991450c55e5d613020dc03735 diff --git a/sci-libs/datasets/datasets-2.15.0.ebuild b/sci-libs/datasets/datasets-2.16.0.ebuild similarity index 95% rename from sci-libs/datasets/datasets-2.15.0.ebuild rename to sci-libs/datasets/datasets-2.16.0.ebuild index 52af2f93ac88..0325b5ae63d6 100644 --- a/sci-libs/datasets/datasets-2.15.0.ebuild +++ b/sci-libs/datasets/datasets-2.16.0.ebuild @@ -4,7 +4,7 @@ EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{9..11} ) +PYTHON_COMPAT=( python3_{10..12} ) DISTUTILS_SINGLE_IMPL=1 inherit distutils-r1 @@ -36,7 +36,7 @@ RDEPEND=" dev-python/tqdm[${PYTHON_USEDEP}] dev-python/xxhash[${PYTHON_USEDEP}] dev-python/zstandard[${PYTHON_USEDEP}] - >=sci-libs/huggingface_hub-0.14.0[${PYTHON_USEDEP}] + sci-libs/huggingface_hub[${PYTHON_USEDEP}] sci-libs/scikit-learn[${PYTHON_USEDEP}] ') " diff --git a/sci-libs/datasets/files/datasets-2.15.0-tests.patch b/sci-libs/datasets/files/datasets-2.15.0-tests.patch deleted file mode 100644 index 64d8dcfdc8d8.. --- a/sci-libs/datasets/files/datasets-2.15.0-tests.patch +++ /dev/null @@ -1,46 +0,0 @@ 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 -@@ -3978,7 +3978,6 @@ - [ - "relative/path", - "/absolute/path", --"s3://bucket/relative/path", - "hdfs://relative/path", - "hdfs:///absolute/path", - ], a/tests/test_hf_gcp.py 2024-02-20 21:55:18.821852434 +0100 -+++ b/tests/test_hf_gcp.py 2024-02-20 21:55:46.525186394 +0100 -@@ -22,7 +22,6 @@ - {"dataset": "wikipedia", "config_name": "20220301.it"}, - {"dataset": "wikipedia", "config_name": "20220301.simple"}, - {"dataset": "snli", "config_name": "plain_text"}, --{"dataset": "eli5", "config_name": "LFQA_reddit"}, - {"dataset": "wiki40b", "config_name": "en"}, - {"dataset": "wiki_dpr", "config_name": "psgs_w100.nq.compressed"}, - {"dataset": "wiki_dpr", "config_name": "psgs_w100.nq.no_index"}, a/tests/test_inspect.py2024-02-20 22:01:35.148488467 +0100 -+++ b/tests/test_inspect.py2024-02-20 22:02:14.458561571 +0100 -@@ -15,7 +15,7 @@ - pytestmark = pytest.mark.integration - - --@pytest.mark.parametrize("path", ["paws", "csv"]) -+@pytest.mark.parametrize("path", ["csv"]) - def test_inspect_dataset(path, tmp_path): - inspect_dataset(path, tmp_path) - script_name = path + ".py" a/tests/test_load.py 2024-02-20 22:12:13.699209107 +0100 -+++ b/tests/test_load.py 2024-02-20 22:13:10.862626708 +0100 -@@ -1235,12 +1235,6 @@ - - - @pytest.mark.integration --def test_load_streaming_private_dataset_with_zipped_data(hf_token, hf_private_dataset_repo_zipped_txt_data): --ds = load_dataset(hf_private_dataset_repo_zipped_txt_data, streaming=True, token=hf_token) --assert next(iter(ds)) is not None -- -- --@pytest.mark.integration - def test_load_dataset_config_kwargs_passed_as_arguments(): - ds_default = load_dataset(SAMPLE_DATASET_IDENTIFIER4) - ds_custom = load_dataset(SAMPLE_DATASET_IDENTIFIER4, drop_metadata=True) diff --git a/sci-libs/datasets/files/datasets-2.16.0-tests.patch b/sci-libs/datasets/files/datasets-2.16.0-tests.patch new file mode 100644 index ..6b2845bce168 --- /dev/null +++ b/sci-libs/datasets/files/datasets-2.16.0-tests.patch @@
[gentoo-commits] repo/gentoo:master commit in: sci-libs/datasets/, sci-libs/datasets/files/
commit: 6e90b8bfd4261e397712272c9565c5ab32aeeb98 Author: Alfredo Tupone gentoo org> AuthorDate: Thu Aug 24 15:28:19 2023 + Commit: Alfredo Tupone gentoo org> CommitDate: Thu Aug 24 15:28:47 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6e90b8bf sci-libs/datasets: add 2.12.0 Signed-off-by: Alfredo Tupone gentoo.org> sci-libs/datasets/Manifest | 1 + sci-libs/datasets/datasets-2.12.0.ebuild | 53 + .../datasets/files/datasets-2.12.0-tests.patch | 242 + 3 files changed, 296 insertions(+) diff --git a/sci-libs/datasets/Manifest b/sci-libs/datasets/Manifest index 37284ce3b3e7..3fa2a12d0e5c 100644 --- a/sci-libs/datasets/Manifest +++ b/sci-libs/datasets/Manifest @@ -1 +1,2 @@ DIST datasets-2.11.0.gh.tar.gz 2141289 BLAKE2B 0fb471dd6ee5de3831eb6586c4a15e67381262470b72d5ab02ee87dfc7977cb4d40e04da6507049d1e47cb8948cad11988bb7627293b48231e1cd413d2cfb885 SHA512 9ec2274d7978e3dde1b2f8ce78dd65bdf66742bbfee7b8672af46216aeaae3ef5c4604a8a5ea0bdee808f1c362cca9a122c16d2e9a161678148e581e4cd5c863 +DIST datasets-2.12.0.gh.tar.gz 2149274 BLAKE2B 8f188901dfe293ac2b673f37e0d135e01a8f131adf9030ef1815ce2faa7ba0b36faf64a002cae1ced2d3ed5b7f50f43ba5cda90ab9254fd5f66bbfaed6085f3f SHA512 7389a1c6ee8ff4cda39a2c3f52218aa6f4b1cd6b45f48f83bfa2191359a8999d54153120d968b3cf7e5e932f88822783578e3d859dcb20f38fb0d915d88220c9 diff --git a/sci-libs/datasets/datasets-2.12.0.ebuild b/sci-libs/datasets/datasets-2.12.0.ebuild new file mode 100644 index ..66b609fd2b57 --- /dev/null +++ b/sci-libs/datasets/datasets-2.12.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) +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" +IUSE="test" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + ${PYTHON_DEPS} + sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + dev-python/absl-py[${PYTHON_USEDEP}] + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/fsspec[${PYTHON_USEDEP}] + dev-python/multiprocess[${PYTHON_USEDEP}] + dev-python/pandas[${PYTHON_USEDEP}] + dev-python/pyarrow[${PYTHON_USEDEP},parquet,snappy] + dev-python/tqdm[${PYTHON_USEDEP}] + dev-python/xxhash[${PYTHON_USEDEP}] + dev-python/zstandard[${PYTHON_USEDEP}] + sci-libs/huggingface_hub[${PYTHON_USEDEP}] + sci-libs/scikit-learn[${PYTHON_USEDEP}] + ') +" +DEPEND="${RDEPEND}" +BDEPEND="test? ( + $(python_gen_cond_dep ' + dev-python/pytest-datadir[${PYTHON_USEDEP}] + dev-python/decorator[${PYTHON_USEDEP}] + =dev-python/sqlalchemy-1*[${PYTHON_USEDEP}] + sci-libs/jiwer[${PYTHON_USEDEP}] + sci-libs/seqeval[${PYTHON_USEDEP}] + ') +)" + +PATCHES=( "${FILESDIR}"/${P}-tests.patch ) + +distutils_enable_tests pytest diff --git a/sci-libs/datasets/files/datasets-2.12.0-tests.patch b/sci-libs/datasets/files/datasets-2.12.0-tests.patch new file mode 100644 index ..6be3156bb70d --- /dev/null +++ b/sci-libs/datasets/files/datasets-2.12.0-tests.patch @@ -0,0 +1,242 @@ +--- a/tests/test_metric_common.py 2023-05-04 18:48:48.550861318 +0200 b/tests/test_metric_common.py 2023-05-04 18:50:25.787364577 +0200 +@@ -93,6 +93,7 @@ + INTENSIVE_CALLS_PATCHER = {} + metric_name = None + ++@pytest.mark.skip(reason="disabling, depends on bert_score, bleurt, math_equivalence, coval, nltk, faiss, mauve, rouge_score, sacrebleu, sacremoses ...") + @pytest.mark.filterwarnings("ignore:metric_module_factory is deprecated:FutureWarning") + @pytest.mark.filterwarnings("ignore:load_metric is deprecated:FutureWarning") + def test_load_metric(self, metric_name): +--- a/tests/test_hf_gcp.py 2023-05-04 19:33:31.150825303 +0200 b/tests/test_hf_gcp.py 2023-05-04 19:40:08.401759538 +0200 +@@ -75,6 +75,7 @@ + self.assertTrue(os.path.exists(datset_info_path)) + + ++@pytest.mark.skip(reason="require apache_beam") + @pytest.mark.integration + def test_as_dataset_from_hf_gcs(tmp_path_factory): + tmp_dir = tmp_path_factory.mktemp("test_hf_gcp") / "test_wikipedia_simple" +--- a/tests/test_distributed.py2023-05-04 19:43:09.861275030 +0200 b/tests/test_distributed.py2023-05-04 19:44:17.608326722 +0200 +@@ -74,6 +74,7 @@ + split_dataset_by_node(full_ds.shuffle(), rank=0, world_size=world_size) + +
[gentoo-commits] repo/gentoo:master commit in: sci-libs/datasets/, sci-libs/datasets/files/
commit: 6d7268c6c8e47b43efd5550b05d3ad587704bdff Author: Alfredo Tupone gentoo org> AuthorDate: Sun May 7 20:15:13 2023 + Commit: Alfredo Tupone gentoo org> CommitDate: Sun May 7 20:15:42 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6d7268c6 sci-libs/datasets: new package, add 2.11.0 Signed-off-by: Alfredo Tupone gentoo.org> sci-libs/datasets/Manifest | 1 + sci-libs/datasets/datasets-2.11.0.ebuild | 53 +++ .../datasets/files/datasets-2.11.0-tests.patch | 168 + sci-libs/datasets/metadata.xml | 12 ++ 4 files changed, 234 insertions(+) diff --git a/sci-libs/datasets/Manifest b/sci-libs/datasets/Manifest new file mode 100644 index ..37284ce3b3e7 --- /dev/null +++ b/sci-libs/datasets/Manifest @@ -0,0 +1 @@ +DIST datasets-2.11.0.gh.tar.gz 2141289 BLAKE2B 0fb471dd6ee5de3831eb6586c4a15e67381262470b72d5ab02ee87dfc7977cb4d40e04da6507049d1e47cb8948cad11988bb7627293b48231e1cd413d2cfb885 SHA512 9ec2274d7978e3dde1b2f8ce78dd65bdf66742bbfee7b8672af46216aeaae3ef5c4604a8a5ea0bdee808f1c362cca9a122c16d2e9a161678148e581e4cd5c863 diff --git a/sci-libs/datasets/datasets-2.11.0.ebuild b/sci-libs/datasets/datasets-2.11.0.ebuild new file mode 100644 index ..0ff1a4f0b386 --- /dev/null +++ b/sci-libs/datasets/datasets-2.11.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{9..11} ) +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" +IUSE="test" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" + +RDEPEND=" + ${PYTHON_DEPS} + sci-libs/pytorch[${PYTHON_SINGLE_USEDEP}] + $(python_gen_cond_dep ' + dev-python/pyarrow[${PYTHON_USEDEP},parquet,snappy] + dev-python/fsspec[${PYTHON_USEDEP}] + dev-python/multiprocess[${PYTHON_USEDEP}] + dev-python/aiohttp[${PYTHON_USEDEP}] + dev-python/xxhash[${PYTHON_USEDEP}] + dev-python/zstandard[${PYTHON_USEDEP}] + dev-python/absl-py[${PYTHON_USEDEP}] + sci-libs/scikit-learn[${PYTHON_USEDEP}] + ') +" +DEPEND="${RDEPEND}" +BDEPEND="test? ( + $(python_gen_cond_dep ' + dev-python/pytest-datadir[${PYTHON_USEDEP}] + ') +)" + +PATCHES=( "${FILESDIR}"/${P}-tests.patch ) + +distutils_enable_tests pytest + +src_prepare() { + # Require jiwer + rm metrics/cer/test_cer.py || die + + distutils-r1_src_prepare +} diff --git a/sci-libs/datasets/files/datasets-2.11.0-tests.patch b/sci-libs/datasets/files/datasets-2.11.0-tests.patch new file mode 100644 index ..01e5d9c70e7b --- /dev/null +++ b/sci-libs/datasets/files/datasets-2.11.0-tests.patch @@ -0,0 +1,168 @@ +--- a/tests/test_metric_common.py 2023-05-04 18:48:48.550861318 +0200 b/tests/test_metric_common.py 2023-05-04 18:50:25.787364577 +0200 +@@ -93,6 +93,7 @@ + INTENSIVE_CALLS_PATCHER = {} + metric_name = None + ++@pytest.mark.skip(reason="disabling, depends on bert_score, bleurt, math_equivalence, coval, nltk, faiss, mauve, rouge_score, sacrebleu, sacremoses ...") + def test_load_metric(self, metric_name): + doctest.ELLIPSIS_MARKER = "[...]" + metric_module = importlib.import_module( +--- a/tests/test_hf_gcp.py 2023-05-04 19:33:31.150825303 +0200 b/tests/test_hf_gcp.py 2023-05-04 19:40:08.401759538 +0200 +@@ -69,6 +69,7 @@ + self.assertTrue(os.path.exists(datset_info_path)) + + ++@pytest.mark.skip(reason="require apache_beam") + @pytest.mark.integration + def test_wikipedia_frr(tmp_path_factory): + tmp_dir = tmp_path_factory.mktemp("test_hf_gcp") / "test_wikipedia_simple" +--- a/tests/test_distributed.py2023-05-04 19:43:09.861275030 +0200 b/tests/test_distributed.py2023-05-04 19:44:17.608326722 +0200 +@@ -55,6 +55,7 @@ + assert len({tuple(x.values()) for ds in datasets_per_rank for x in ds}) == full_size + + ++@pytest.mark.skip(reason="require distributed torch") + @pytest.mark.parametrize("streaming", [False, True]) + @require_torch + @pytest.mark.skipif(os.name == "nt", reason="execute_subprocess_async doesn't support windows") +@@ -76,6 +77,7 @@ + execute_subprocess_async(cmd, env=os.environ.copy()) + + ++@pytest.mark.skip(reason="require distributed torch") + @pytest.mark.parametrize( + "nproc_per_node, num_workers", + [ +--- a/tests/utils.py 2023-05-06 08:43:16.251987543 +0200 b/tests/utils.py 2023-05-06 08:44:24.467952870 +0200 +@@ -54,8 +54,8 @@ + # Audio + require_sndfile =