You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.4 KiB
53 lines
1.4 KiB
2 months ago
|
# Copyright 2023-2024 Gentoo Authors
|
||
1 year ago
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI=8
|
||
|
|
||
|
DISTUTILS_USE_PEP517=setuptools
|
||
2 months ago
|
PYTHON_COMPAT=( python3_{11..12} )
|
||
1 year ago
|
DISTUTILS_SINGLE_IMPL=1
|
||
1 year ago
|
inherit distutils-r1
|
||
|
|
||
|
DESCRIPTION="makes evaluating, comparing models and reporting their performance easier"
|
||
|
HOMEPAGE="
|
||
|
https://pypi.org/project/evaluate/
|
||
|
https://github.com/huggingface/evaluate
|
||
|
"
|
||
|
SRC_URI="https://github.com/huggingface/${PN}/archive/refs/tags/v${PV}.tar.gz
|
||
|
-> ${P}.gh.tar.gz"
|
||
|
|
||
|
LICENSE="Apache-2.0"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64"
|
||
|
|
||
|
RDEPEND="
|
||
1 year ago
|
$(python_gen_cond_dep '
|
||
|
dev-python/matplotlib[${PYTHON_USEDEP}]
|
||
|
dev-python/pyarrow[${PYTHON_USEDEP},parquet]
|
||
|
dev-python/unidecode[${PYTHON_USEDEP}]
|
||
|
')
|
||
|
sci-libs/datasets[${PYTHON_SINGLE_USEDEP}]
|
||
1 month ago
|
sci-libs/transformers[${PYTHON_SINGLE_USEDEP}]
|
||
1 year ago
|
"
|
||
|
BDEPEND="test? (
|
||
1 year ago
|
$(python_gen_cond_dep '
|
||
|
sci-libs/jiwer[${PYTHON_USEDEP}]
|
||
|
sci-libs/seqeval[${PYTHON_USEDEP}]
|
||
|
')
|
||
1 year ago
|
)"
|
||
|
|
||
|
PATCHES=( "${FILESDIR}"/${P}-tests.patch )
|
||
|
|
||
|
distutils_enable_tests pytest
|
||
|
|
||
|
src_prepare() {
|
||
|
# These require packages not available on gentoo
|
||
|
rm -r metrics/{bertscore,bleurt,character,charcut_mt,chrf,code_eval} || die
|
||
|
rm -r metrics/{competition_math,coval,google_bleu,mauve,meteor} || die
|
||
|
rm -r metrics/{nist_mt,rl_reliability,rouge,sacrebleu,sari} || die
|
||
|
rm -r metrics/{ter,trec_eval,wiki_split,xtreme_s} || die
|
||
|
rm -r measurements/word_length || die
|
||
1 year ago
|
rm tests/test_evaluation_suite.py || die
|
||
1 year ago
|
distutils-r1_src_prepare
|
||
|
}
|