evalsuite-python 0.5.5__py3-none-any.whl → 0.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evalsuite/_native.py +60 -0
- evalsuite/stats/_resolve.py +92 -1
- evalsuite/stats/intervals.py +12 -3
- evalsuite/text/generation.py +170 -33
- evalsuite/version.py +1 -1
- evalsuite/vision/detection.py +23 -0
- {evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/METADATA +56 -36
- {evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/RECORD +12 -11
- {evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/WHEEL +0 -0
- {evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/entry_points.txt +0 -0
- {evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/licenses/LICENSE +0 -0
- {evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/licenses/LICENSE-APACHE +0 -0
evalsuite/_native.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Access to the compiled core (``evalsuite._core``, built from rust/).
|
|
2
|
+
|
|
3
|
+
Every function that has a compiled kernel keeps its Python implementation: it is the reference the kernel is
|
|
4
|
+
tested against and the fallback when the extension is missing (the pure-Python wheel, an unsupported platform)
|
|
5
|
+
or when ``EVALSUITE_PURE_PYTHON=1`` is set. Both give identical results.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import os
|
|
11
|
+
from typing import Any, Optional
|
|
12
|
+
|
|
13
|
+
core: Optional[Any]
|
|
14
|
+
if os.environ.get("EVALSUITE_PURE_PYTHON", "").strip().lower() in ("1", "true", "yes", "on"):
|
|
15
|
+
core = None
|
|
16
|
+
else:
|
|
17
|
+
try:
|
|
18
|
+
from . import _core as core # type: ignore[attr-defined, no-redef]
|
|
19
|
+
except ImportError: # pure-Python wheel or source checkout without a build
|
|
20
|
+
core = None
|
|
21
|
+
|
|
22
|
+
HAVE_NATIVE = core is not None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def backend() -> str:
|
|
26
|
+
"""``"rust"`` when the compiled core is in use, ``"python"`` otherwise."""
|
|
27
|
+
return "rust" if HAVE_NATIVE else "python"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def array_view(arr: Any, dtype: Any) -> tuple[Any, tuple[int, int]]:
|
|
31
|
+
"""A C-contiguous array of exactly ``dtype`` and its ``(data address, element count)`` view for the core.
|
|
32
|
+
|
|
33
|
+
The returned array must stay referenced (keep it in a local variable) until the core call returns; the
|
|
34
|
+
core only reads from it."""
|
|
35
|
+
import numpy as np
|
|
36
|
+
|
|
37
|
+
a = np.ascontiguousarray(arr, dtype=dtype)
|
|
38
|
+
if not a.flags.c_contiguous or a.dtype != np.dtype(dtype): # pragma: no cover - guaranteed by NumPy
|
|
39
|
+
raise ValueError("array must be C-contiguous with the requested dtype")
|
|
40
|
+
return a, (int(a.ctypes.data), int(a.size))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Vocab:
|
|
44
|
+
"""Maps tokens to consecutive integer ids (0, 1, 2, …) so token sequences can cross into the compiled core."""
|
|
45
|
+
|
|
46
|
+
__slots__ = ("ids",)
|
|
47
|
+
|
|
48
|
+
def __init__(self) -> None:
|
|
49
|
+
self.ids: dict[Any, int] = {}
|
|
50
|
+
|
|
51
|
+
def encode(self, tokens: Any) -> list[int]:
|
|
52
|
+
ids = self.ids
|
|
53
|
+
get = ids.get
|
|
54
|
+
out = []
|
|
55
|
+
for t in tokens:
|
|
56
|
+
i = get(t)
|
|
57
|
+
if i is None:
|
|
58
|
+
i = ids[t] = len(ids)
|
|
59
|
+
out.append(i)
|
|
60
|
+
return out
|
evalsuite/stats/_resolve.py
CHANGED
|
@@ -10,11 +10,32 @@ from typing import Any, Optional
|
|
|
10
10
|
import numpy as np
|
|
11
11
|
from numpy.typing import NDArray
|
|
12
12
|
|
|
13
|
+
from .._native import array_view, core
|
|
13
14
|
from ..core.exceptions import InputValidationError, StatisticalTestError
|
|
14
15
|
from ..core.validation import target_type, to_numpy
|
|
15
16
|
|
|
16
17
|
MetricFn = Callable[..., Any]
|
|
17
18
|
|
|
19
|
+
# Label metrics computed from the confusion matrix alone, all accepting sample_weight: on a resample they equal
|
|
20
|
+
# the same metric on the resample's distinct (true, predicted) pairs weighted by how often each occurs (tested
|
|
21
|
+
# bit for bit in tests/stats/test_resample_compression.py).
|
|
22
|
+
_CONFUSION_METRICS = frozenset(
|
|
23
|
+
{
|
|
24
|
+
"accuracy",
|
|
25
|
+
"balanced_accuracy",
|
|
26
|
+
"cohen_kappa",
|
|
27
|
+
"f1",
|
|
28
|
+
"fbeta",
|
|
29
|
+
"jaccard",
|
|
30
|
+
"mcc",
|
|
31
|
+
"npv",
|
|
32
|
+
"precision",
|
|
33
|
+
"recall",
|
|
34
|
+
"specificity",
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
_MAX_COMPRESSED_CLASSES = 64
|
|
38
|
+
|
|
18
39
|
|
|
19
40
|
def resolve_metric(metric: Any) -> tuple[MetricFn, str]:
|
|
20
41
|
"""A metric function (``es.f1``) or its name (``"f1"``, ``"classification.f1"``)."""
|
|
@@ -125,8 +146,78 @@ class MetricCall:
|
|
|
125
146
|
self.kwargs["labels"] = np.unique(present)
|
|
126
147
|
if self.weight is not None and "sample_weight" not in params:
|
|
127
148
|
raise InputValidationError(f"{getattr(fn, '__name__', 'This metric')} does not accept sample_weight.")
|
|
149
|
+
self._codes: Optional[NDArray[np.uint32]] = None
|
|
150
|
+
self._labels: Optional[NDArray[Any]] = None
|
|
151
|
+
self._k = 0
|
|
152
|
+
if y_pred is not None:
|
|
153
|
+
self._setup_compression()
|
|
154
|
+
|
|
155
|
+
def _setup_compression(self) -> None:
|
|
156
|
+
"""Enable counting-based evaluation for confusion-matrix metrics on unweighted 1-D labels: each
|
|
157
|
+
observation becomes one code (true class × k + predicted class), and a resample is summarised by how
|
|
158
|
+
often each code occurs, so the metric runs on at most k² weighted pairs instead of n observations."""
|
|
159
|
+
fn = self.fn
|
|
160
|
+
if (
|
|
161
|
+
getattr(fn, "__module__", "") != "evalsuite.classification.metrics"
|
|
162
|
+
or getattr(fn, "__name__", "") not in _CONFUSION_METRICS
|
|
163
|
+
or self.weight is not None
|
|
164
|
+
or not self.categorical
|
|
165
|
+
or self.y_true.ndim != 1
|
|
166
|
+
or self.second.ndim != 1
|
|
167
|
+
or self.y_true.dtype != self.second.dtype
|
|
168
|
+
or self.y_true.dtype.kind not in "biuU"
|
|
169
|
+
):
|
|
170
|
+
return
|
|
171
|
+
try:
|
|
172
|
+
labels = np.unique(np.concatenate([self.y_true, self.second]))
|
|
173
|
+
except TypeError: # pragma: no cover - same-dtype arrays are comparable
|
|
174
|
+
return
|
|
175
|
+
k = labels.shape[0]
|
|
176
|
+
if k > _MAX_COMPRESSED_CLASSES:
|
|
177
|
+
return
|
|
178
|
+
t = np.searchsorted(labels, self.y_true)
|
|
179
|
+
p = np.searchsorted(labels, self.second)
|
|
180
|
+
self._codes = (t * k + p).astype(np.uint32)
|
|
181
|
+
self._labels = labels
|
|
182
|
+
self._k = k
|
|
183
|
+
|
|
184
|
+
@property
|
|
185
|
+
def compressible(self) -> bool:
|
|
186
|
+
return self._codes is not None
|
|
187
|
+
|
|
188
|
+
def code_counts(self, idx: NDArray[np.int64]) -> NDArray[np.int64]:
|
|
189
|
+
"""How often each (true, predicted) code occurs among the observations ``idx``."""
|
|
190
|
+
if self._codes is None: # pragma: no cover - guarded by callers
|
|
191
|
+
raise RuntimeError("not compressible")
|
|
192
|
+
return np.bincount(self._codes[idx], minlength=self._k * self._k)
|
|
193
|
+
|
|
194
|
+
def batch_code_counts(self, indices: NDArray[np.int64]) -> Optional[NDArray[np.uint64]]:
|
|
195
|
+
"""Code counts for every row of ``indices`` at once (compiled core), or None without it."""
|
|
196
|
+
if self._codes is None or core is None or indices.ndim != 2 or indices.shape[0] == 0:
|
|
197
|
+
return None
|
|
198
|
+
kk = self._k * self._k
|
|
199
|
+
codes, codes_v = array_view(self._codes, np.uint32)
|
|
200
|
+
idx, idx_v = array_view(indices, np.int64) # resample indices are int64 already: no copy
|
|
201
|
+
raw = core.code_counts(codes_v, kk, idx_v, idx.shape[0])
|
|
202
|
+
del codes, idx
|
|
203
|
+
counts: NDArray[np.uint64] = np.frombuffer(raw, dtype=np.uint64).reshape(indices.shape[0], kk)
|
|
204
|
+
return counts
|
|
205
|
+
|
|
206
|
+
def from_counts(self, counts: NDArray[Any], idx: Optional[NDArray[np.int64]] = None) -> float:
|
|
207
|
+
"""The metric on observations summarised by ``counts`` (equal to calling it on them directly)."""
|
|
208
|
+
if self._labels is None: # pragma: no cover - guarded by callers
|
|
209
|
+
raise RuntimeError("not compressible")
|
|
210
|
+
nz = np.flatnonzero(counts)
|
|
211
|
+
if nz.shape[0] < 2 and idx is not None:
|
|
212
|
+
return self(idx, compress=False) # a single distinct pair: use the observations themselves
|
|
213
|
+
k = self._k
|
|
214
|
+
kw = dict(self.kwargs)
|
|
215
|
+
kw["sample_weight"] = counts[nz].astype(np.float64)
|
|
216
|
+
return float(self.fn(self._labels[nz // k], self._labels[nz % k], **kw))
|
|
128
217
|
|
|
129
|
-
def __call__(self, idx: Optional[NDArray[np.int64]] = None) -> float:
|
|
218
|
+
def __call__(self, idx: Optional[NDArray[np.int64]] = None, *, compress: bool = True) -> float:
|
|
219
|
+
if compress and idx is not None and self._codes is not None:
|
|
220
|
+
return self.from_counts(self.code_counts(idx), idx)
|
|
130
221
|
if idx is None:
|
|
131
222
|
yt, s, w = self.y_true, self.second, self.weight
|
|
132
223
|
else:
|
evalsuite/stats/intervals.py
CHANGED
|
@@ -61,11 +61,13 @@ def bootstrap_distribution(call: MetricCall, indices: NDArray[np.int64]) -> tupl
|
|
|
61
61
|
"""Metric value on each resample; resamples where the metric is undefined become NaN."""
|
|
62
62
|
values = np.empty(indices.shape[0])
|
|
63
63
|
failed = 0
|
|
64
|
+
# Confusion-matrix metrics: count every resample's (true, predicted) pairs in one compiled pass.
|
|
65
|
+
counts = call.batch_code_counts(indices)
|
|
64
66
|
with warnings.catch_warnings():
|
|
65
67
|
warnings.simplefilter("ignore") # zero-division warnings inside resamples are expected noise
|
|
66
68
|
for b, idx in enumerate(indices):
|
|
67
69
|
try:
|
|
68
|
-
values[b] = call(idx)
|
|
70
|
+
values[b] = call(idx) if counts is None else call.from_counts(counts[b], idx)
|
|
69
71
|
except EvalSuiteError:
|
|
70
72
|
values[b] = np.nan
|
|
71
73
|
failed += 1
|
|
@@ -77,12 +79,19 @@ def _jackknife(call: MetricCall, n: int, rng: np.random.Generator, groups: int)
|
|
|
77
79
|
blocks = [np.array([i]) for i in range(n)] if n <= groups else np.array_split(rng.permutation(n), groups)
|
|
78
80
|
everything = np.arange(n)
|
|
79
81
|
out = np.empty(len(blocks))
|
|
82
|
+
# Confusion-matrix metrics: the counts without a block are the full counts minus the block's.
|
|
83
|
+
full = call.code_counts(everything) if call.compressible else None
|
|
80
84
|
with warnings.catch_warnings():
|
|
81
85
|
warnings.simplefilter("ignore")
|
|
82
86
|
for j, block in enumerate(blocks):
|
|
83
|
-
keep = np.setdiff1d(everything, block, assume_unique=True)
|
|
84
87
|
try:
|
|
85
|
-
|
|
88
|
+
if full is not None:
|
|
89
|
+
counts = full - call.code_counts(block)
|
|
90
|
+
if np.count_nonzero(counts) >= 2:
|
|
91
|
+
out[j] = call.from_counts(counts)
|
|
92
|
+
continue
|
|
93
|
+
keep = np.setdiff1d(everything, block, assume_unique=True)
|
|
94
|
+
out[j] = call(keep, compress=False)
|
|
86
95
|
except EvalSuiteError:
|
|
87
96
|
out[j] = np.nan
|
|
88
97
|
return out
|
evalsuite/text/generation.py
CHANGED
|
@@ -17,6 +17,7 @@ from typing import Any, Callable, Literal, Optional
|
|
|
17
17
|
|
|
18
18
|
import numpy as np
|
|
19
19
|
|
|
20
|
+
from .._native import Vocab, core
|
|
20
21
|
from ..core.exceptions import InputValidationError
|
|
21
22
|
from ..core.registry import register
|
|
22
23
|
from ..core.result import MetricResult
|
|
@@ -130,6 +131,19 @@ def _bleu_stats(hyp: list[str], refs: list[list[str]], order: int) -> list[float
|
|
|
130
131
|
return [hyp_len, closest, *correct, *total]
|
|
131
132
|
|
|
132
133
|
|
|
134
|
+
def _bleu_segment_stats(
|
|
135
|
+
hyps: list[list[str]], refs: list[list[list[str]]], order: int
|
|
136
|
+
) -> list[list[int]] | list[list[float]]:
|
|
137
|
+
"""BLEU statistics of every segment: compiled core when available, else :func:`_bleu_stats`."""
|
|
138
|
+
if core is not None:
|
|
139
|
+
v = Vocab()
|
|
140
|
+
stats: list[list[int]] = core.bleu_stats(
|
|
141
|
+
[v.encode(h) for h in hyps], [[v.encode(r) for r in rs] for rs in refs], order
|
|
142
|
+
)
|
|
143
|
+
return stats
|
|
144
|
+
return [_bleu_stats(h, rs, order) for h, rs in zip(hyps, refs)]
|
|
145
|
+
|
|
146
|
+
|
|
133
147
|
def _bleu_from_stats(
|
|
134
148
|
stats: Sequence[float], order: int, smooth: str, smooth_value: Optional[float], effective_order: bool
|
|
135
149
|
) -> tuple[float, list[float], float]:
|
|
@@ -209,8 +223,8 @@ def bleu(
|
|
|
209
223
|
tok = _tokenizer(tokenize)
|
|
210
224
|
hyp_tok = _prep(preds, lowercase, tok)
|
|
211
225
|
acc = [0.0] * (2 + 2 * order)
|
|
212
|
-
for
|
|
213
|
-
for i, v in enumerate(
|
|
226
|
+
for seg in _bleu_segment_stats(hyp_tok, [_prep(rs, lowercase, tok) for rs in refs], order):
|
|
227
|
+
for i, v in enumerate(seg):
|
|
214
228
|
acc[i] += v
|
|
215
229
|
stats = np.asarray(acc)
|
|
216
230
|
score, precisions, bp = _bleu_from_stats(acc, order, smooth, smooth_value, effective_order)
|
|
@@ -261,14 +275,8 @@ def sentence_bleu(
|
|
|
261
275
|
order = check_positive_int(max_order, "max_order")
|
|
262
276
|
smooth = _check_smooth(smooth)
|
|
263
277
|
tok = _tokenizer(tokenize)
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
_bleu_from_stats(_bleu_stats(h, _prep(rs, lowercase, tok), order), order, smooth, smooth_value, True)[
|
|
267
|
-
0
|
|
268
|
-
]
|
|
269
|
-
for h, rs in zip(_prep(preds, lowercase, tok), refs)
|
|
270
|
-
]
|
|
271
|
-
)
|
|
278
|
+
segs = _bleu_segment_stats(_prep(preds, lowercase, tok), [_prep(rs, lowercase, tok) for rs in refs], order)
|
|
279
|
+
scores = np.array([_bleu_from_stats(seg, order, smooth, smooth_value, True)[0] for seg in segs])
|
|
272
280
|
value: Any = scores if average is None else float(scores.mean())
|
|
273
281
|
return MetricResult("sentence_bleu", "Sentence BLEU", value, {"max_order": order, "smooth": smooth})
|
|
274
282
|
|
|
@@ -305,6 +313,46 @@ def _chrf_ngrams(sent: str, char_order: int, word_order: int, whitespace: bool)
|
|
|
305
313
|
return out
|
|
306
314
|
|
|
307
315
|
|
|
316
|
+
def _chrf_native(
|
|
317
|
+
preds: list[str],
|
|
318
|
+
refs: list[list[str]],
|
|
319
|
+
char_order: int,
|
|
320
|
+
word_order: int,
|
|
321
|
+
beta: float,
|
|
322
|
+
lowercase: bool,
|
|
323
|
+
whitespace: bool,
|
|
324
|
+
eps_smoothing: bool,
|
|
325
|
+
) -> Optional[list[float]]:
|
|
326
|
+
"""Summed best-reference chrF statistics from the compiled core, or None to use the Python path (no core,
|
|
327
|
+
or text the core cannot take, such as lone surrogates)."""
|
|
328
|
+
if core is None:
|
|
329
|
+
return None
|
|
330
|
+
v = Vocab()
|
|
331
|
+
|
|
332
|
+
def parts(sent: str) -> tuple[str, list[int]]:
|
|
333
|
+
sent = sent.lower() if lowercase else sent
|
|
334
|
+
# Whitespace is removed here, with Python's definition of whitespace, not in the core.
|
|
335
|
+
line = sent if whitespace else "".join(sent.split())
|
|
336
|
+
return line, (v.encode(_chrf_words(sent)) if word_order else [])
|
|
337
|
+
|
|
338
|
+
try:
|
|
339
|
+
hp = [parts(h) for h in preds]
|
|
340
|
+
rp = [[parts(r) for r in rs] for rs in refs]
|
|
341
|
+
total: list[float] = core.chrf_corpus(
|
|
342
|
+
[h[0] for h in hp],
|
|
343
|
+
[h[1] for h in hp],
|
|
344
|
+
[[r[0] for r in rs] for rs in rp],
|
|
345
|
+
[[r[1] for r in rs] for rs in rp],
|
|
346
|
+
char_order,
|
|
347
|
+
word_order,
|
|
348
|
+
float(beta),
|
|
349
|
+
eps_smoothing,
|
|
350
|
+
)
|
|
351
|
+
except UnicodeEncodeError:
|
|
352
|
+
return None
|
|
353
|
+
return total
|
|
354
|
+
|
|
355
|
+
|
|
308
356
|
def _chrf_f(stats: Sequence[float], order: int, beta: float, eps_smoothing: bool) -> float:
|
|
309
357
|
eps = 1e-16
|
|
310
358
|
factor = beta**2
|
|
@@ -361,8 +409,9 @@ def chrf(
|
|
|
361
409
|
if isinstance(word_order, bool) or not isinstance(word_order, (int, np.integer)) or word_order < 0:
|
|
362
410
|
raise InputValidationError("word_order must be an integer >= 0 (2 gives chrF++).")
|
|
363
411
|
order = char_order + int(word_order)
|
|
364
|
-
|
|
365
|
-
|
|
412
|
+
native = _chrf_native(preds, refs, char_order, int(word_order), beta, lowercase, whitespace, eps_smoothing)
|
|
413
|
+
total = native if native is not None else [0.0] * (3 * order)
|
|
414
|
+
for hyp, rs in zip(preds, refs) if native is None else ():
|
|
366
415
|
h = _chrf_ngrams(hyp.lower() if lowercase else hyp, char_order, word_order, whitespace)
|
|
367
416
|
best: Optional[list[float]] = None
|
|
368
417
|
best_f = -1.0
|
|
@@ -599,11 +648,17 @@ def ter(references: Any, predictions: Any, *, case_sensitive: bool = False) -> M
|
|
|
599
648
|
|
|
600
649
|
edits = 0.0
|
|
601
650
|
ref_len = 0.0
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
651
|
+
if core is not None:
|
|
652
|
+
v = Vocab()
|
|
653
|
+
edits, ref_len = core.ter_corpus(
|
|
654
|
+
[v.encode(tok(h)) for h in preds], [[v.encode(tok(r)) for r in rs] for rs in refs]
|
|
655
|
+
)
|
|
656
|
+
else:
|
|
657
|
+
for hyp, rs in zip(preds, refs):
|
|
658
|
+
h = tok(hyp)
|
|
659
|
+
rws = [tok(r) for r in rs]
|
|
660
|
+
edits += min(_ter_edits(h, r) for r in rws)
|
|
661
|
+
ref_len += sum(len(r) for r in rws) / len(rws)
|
|
607
662
|
value = 100 * edits / ref_len if ref_len > 0 else (100.0 if edits > 0 else 0.0)
|
|
608
663
|
return MetricResult(
|
|
609
664
|
"ter", "TER", value, {"case_sensitive": case_sensitive, "edits": edits, "ref_len": ref_len}
|
|
@@ -717,6 +772,66 @@ def _rouge_lsum(ts: list[list[str]], ps: list[list[str]]) -> tuple[float, float,
|
|
|
717
772
|
_MEASURES = {"precision": 0, "recall": 1, "fmeasure": 2}
|
|
718
773
|
|
|
719
774
|
|
|
775
|
+
def _rouge_triples_native(
|
|
776
|
+
variant: str,
|
|
777
|
+
preds: list[str],
|
|
778
|
+
refs: list[list[str]],
|
|
779
|
+
stemmer: Optional[Callable[[str], str]],
|
|
780
|
+
sents: Callable[[str], list[list[str]]],
|
|
781
|
+
) -> list[list[tuple[float, float, float]]]:
|
|
782
|
+
"""(precision, recall, F) for every (prediction, reference) pair: counts from the compiled core, then the
|
|
783
|
+
same float formulas as :func:`_rouge_n`, :func:`_rouge_l` and :func:`_rouge_lsum`."""
|
|
784
|
+
c = core
|
|
785
|
+
if c is None: # pragma: no cover - only called with the core
|
|
786
|
+
raise RuntimeError("compiled core not available")
|
|
787
|
+
v = Vocab()
|
|
788
|
+
out: list[list[tuple[float, float, float]]] = []
|
|
789
|
+
flat: list[tuple[float, float, float]] = []
|
|
790
|
+
sizes: list[int] = []
|
|
791
|
+
if variant == "Lsum":
|
|
792
|
+
ts: list[list[list[int]]] = []
|
|
793
|
+
ps: list[list[list[int]]] = []
|
|
794
|
+
for pred, rs in zip(preds, refs):
|
|
795
|
+
psents = [v.encode(s) for s in sents(pred)]
|
|
796
|
+
sizes.append(len(rs))
|
|
797
|
+
for ref in rs:
|
|
798
|
+
ts.append([v.encode(s) for s in sents(ref)])
|
|
799
|
+
ps.append(psents)
|
|
800
|
+
for ts_i, ps_i, (hits, m, n) in zip(ts, ps, c.rouge_lsum_hits(ts, ps)):
|
|
801
|
+
if not ts_i or not ps_i or not m or not n:
|
|
802
|
+
flat.append((0.0, 0.0, 0.0))
|
|
803
|
+
else:
|
|
804
|
+
prec, rec = hits / n, hits / m
|
|
805
|
+
flat.append((prec, rec, _f(prec, rec)))
|
|
806
|
+
else:
|
|
807
|
+
tt: list[list[int]] = []
|
|
808
|
+
pp: list[list[int]] = []
|
|
809
|
+
for pred, rs in zip(preds, refs):
|
|
810
|
+
p = v.encode(_rouge_tok(pred, stemmer))
|
|
811
|
+
sizes.append(len(rs))
|
|
812
|
+
for ref in rs:
|
|
813
|
+
tt.append(v.encode(_rouge_tok(ref, stemmer)))
|
|
814
|
+
pp.append(p)
|
|
815
|
+
if variant == "L":
|
|
816
|
+
for t, p, lcs in zip(tt, pp, c.lcs_lengths(tt, pp)):
|
|
817
|
+
if not t or not p:
|
|
818
|
+
flat.append((0.0, 0.0, 0.0))
|
|
819
|
+
else:
|
|
820
|
+
prec, rec = lcs / len(p), lcs / len(t)
|
|
821
|
+
flat.append((prec, rec, _f(prec, rec)))
|
|
822
|
+
else:
|
|
823
|
+
n = int(variant)
|
|
824
|
+
for t, p, inter in zip(tt, pp, c.ngram_overlaps(tt, pp, n)):
|
|
825
|
+
prec = inter / max(len(p) - n + 1, 1)
|
|
826
|
+
rec = inter / max(len(t) - n + 1, 1)
|
|
827
|
+
flat.append((prec, rec, _f(prec, rec)))
|
|
828
|
+
pos = 0
|
|
829
|
+
for k in sizes:
|
|
830
|
+
out.append(flat[pos : pos + k])
|
|
831
|
+
pos += k
|
|
832
|
+
return out
|
|
833
|
+
|
|
834
|
+
|
|
720
835
|
def _rouge(
|
|
721
836
|
variant: str,
|
|
722
837
|
references: Any,
|
|
@@ -736,15 +851,25 @@ def _rouge(
|
|
|
736
851
|
def sents(text: str) -> list[list[str]]:
|
|
737
852
|
return [_rouge_tok(s, stemmer) for s in text.split("\n") if len(s)]
|
|
738
853
|
|
|
854
|
+
all_triples = (
|
|
855
|
+
_rouge_triples_native(variant, preds, refs, stemmer, sents)
|
|
856
|
+
if core is not None
|
|
857
|
+
else [
|
|
858
|
+
[
|
|
859
|
+
_rouge_lsum(sents(ref), sents(pred))
|
|
860
|
+
if variant == "Lsum"
|
|
861
|
+
else (
|
|
862
|
+
_rouge_l(_rouge_tok(ref, stemmer), _rouge_tok(pred, stemmer))
|
|
863
|
+
if variant == "L"
|
|
864
|
+
else _rouge_n(_rouge_tok(ref, stemmer), _rouge_tok(pred, stemmer), int(variant))
|
|
865
|
+
)
|
|
866
|
+
for ref in rs
|
|
867
|
+
]
|
|
868
|
+
for pred, rs in zip(preds, refs)
|
|
869
|
+
]
|
|
870
|
+
)
|
|
739
871
|
scores = []
|
|
740
|
-
for
|
|
741
|
-
triples = []
|
|
742
|
-
for ref in rs:
|
|
743
|
-
if variant == "Lsum":
|
|
744
|
-
triples.append(_rouge_lsum(sents(ref), sents(pred)))
|
|
745
|
-
else:
|
|
746
|
-
t, p = _rouge_tok(ref, stemmer), _rouge_tok(pred, stemmer)
|
|
747
|
-
triples.append(_rouge_l(t, p) if variant == "L" else _rouge_n(t, p, int(variant)))
|
|
872
|
+
for triples in all_triples:
|
|
748
873
|
best = max(range(len(triples)), key=lambda i: (triples[i][2], -i)) # highest F, first on ties
|
|
749
874
|
scores.append(triples[best][k])
|
|
750
875
|
arr = np.array(scores)
|
|
@@ -873,10 +998,12 @@ def self_bleu(predictions: Any, *, max_order: int = 4, tokenize: Any = "13a") ->
|
|
|
873
998
|
order = check_positive_int(max_order, "max_order")
|
|
874
999
|
tok = _tokenizer(tokenize)
|
|
875
1000
|
toks = [tok(p.rstrip()) for p in preds]
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
for
|
|
879
|
-
|
|
1001
|
+
if core is not None:
|
|
1002
|
+
v = Vocab()
|
|
1003
|
+
segs = core.self_bleu_stats([v.encode(t) for t in toks], order)
|
|
1004
|
+
else:
|
|
1005
|
+
segs = [_bleu_stats(toks[i], toks[:i] + toks[i + 1 :], order) for i in range(len(toks))]
|
|
1006
|
+
scores = [_bleu_from_stats(seg, order, "exp", None, True)[0] for seg in segs]
|
|
880
1007
|
return MetricResult("self_bleu", "Self-BLEU", float(np.mean(scores)), {"max_order": order})
|
|
881
1008
|
|
|
882
1009
|
|
|
@@ -1102,10 +1229,20 @@ def meteor(
|
|
|
1102
1229
|
for name, v in (("alpha", alpha), ("gamma", gamma)):
|
|
1103
1230
|
if not 0 <= v <= 1:
|
|
1104
1231
|
raise InputValidationError(f"{name} must be in [0, 1].")
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
for p
|
|
1108
|
-
|
|
1232
|
+
if core is not None and synonyms is None:
|
|
1233
|
+
words = Vocab()
|
|
1234
|
+
h_ids = [words.encode([w.lower() for w in tok(p)]) for p in preds]
|
|
1235
|
+
r_ids = [[words.encode([w.lower() for w in tok(r)]) for r in rs] for rs in refs]
|
|
1236
|
+
stem_of = None
|
|
1237
|
+
if stem_fn is not None: # each distinct word is stemmed once
|
|
1238
|
+
stems = Vocab()
|
|
1239
|
+
stem_of = stems.encode(stem_fn(w) for w in words.ids)
|
|
1240
|
+
scores = core.meteor_scores(h_ids, r_ids, stem_of, float(alpha), float(beta), float(gamma))
|
|
1241
|
+
else:
|
|
1242
|
+
scores = [
|
|
1243
|
+
max(_meteor_single(tok(p), tok(r), stem_fn, synonyms, alpha, beta, gamma) for r in rs)
|
|
1244
|
+
for p, rs in zip(preds, refs)
|
|
1245
|
+
]
|
|
1109
1246
|
arr = np.array(scores)
|
|
1110
1247
|
value: Any = arr if average is None else float(arr.mean())
|
|
1111
1248
|
return MetricResult(
|
evalsuite/version.py
CHANGED
evalsuite/vision/detection.py
CHANGED
|
@@ -26,6 +26,7 @@ from typing import TYPE_CHECKING, Any, Literal, Optional, Union, cast
|
|
|
26
26
|
import numpy as np
|
|
27
27
|
from numpy.typing import NDArray
|
|
28
28
|
|
|
29
|
+
from .._native import array_view, core
|
|
29
30
|
from ..core.exceptions import InputValidationError
|
|
30
31
|
from ..core.export import PathLike, csv_text, html_document, html_table, save_as
|
|
31
32
|
from ..core.registry import register
|
|
@@ -252,6 +253,28 @@ def _evaluate_images(
|
|
|
252
253
|
if g and d:
|
|
253
254
|
ious[i, :d, :g] = pr.ious[:, gorder]
|
|
254
255
|
dt_out[i, :d] = (pr.dt_area < lo) | (pr.dt_area > hi)
|
|
256
|
+
if core is not None and d_max:
|
|
257
|
+
a_iou, v_iou = array_view(ious, np.float64)
|
|
258
|
+
a_gi, v_gi = array_view(gign, np.bool_)
|
|
259
|
+
a_cr, v_cr = array_view(crowd, np.bool_)
|
|
260
|
+
a_out, v_out = array_view(dt_out, np.bool_)
|
|
261
|
+
raw_m, raw_i = core.coco_match(
|
|
262
|
+
v_iou,
|
|
263
|
+
v_gi,
|
|
264
|
+
v_cr,
|
|
265
|
+
v_out,
|
|
266
|
+
p_n,
|
|
267
|
+
d_max,
|
|
268
|
+
g_max,
|
|
269
|
+
[float(t) for t in iou_thrs],
|
|
270
|
+
)
|
|
271
|
+
del a_iou, a_gi, a_cr, a_out
|
|
272
|
+
dtm = np.frombuffer(raw_m, dtype=np.bool_).reshape(p_n, t_n, d_max)
|
|
273
|
+
dt_ig = np.frombuffer(raw_i, dtype=np.bool_).reshape(p_n, t_n, d_max)
|
|
274
|
+
return [
|
|
275
|
+
_Eval(pr.dt_s, dtm[i, :, : d_sizes[i]], dt_ig[i, :, : d_sizes[i]], g_ign_list[i])
|
|
276
|
+
for i, pr in enumerate(pairs)
|
|
277
|
+
]
|
|
255
278
|
gtm = np.zeros((p_n, t_n, g_max), dtype=bool)
|
|
256
279
|
dtm = np.zeros((p_n, t_n, d_max), dtype=bool)
|
|
257
280
|
dt_ig = np.zeros((p_n, t_n, d_max), dtype=bool)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: evalsuite-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: A unified Python framework for machine-learning, clinical, statistical, segmentation, object-detection, uncertainty, and model evaluation.
|
|
5
5
|
Project-URL: Homepage, https://evalsuite-nine.vercel.app
|
|
6
6
|
Project-URL: Documentation, https://evalsuite-nine.vercel.app/docs
|
|
@@ -12,7 +12,7 @@ Maintainer: Manoj Kumar C S, Nikhil D Bharadwaj
|
|
|
12
12
|
License-Expression: MIT OR Apache-2.0
|
|
13
13
|
License-File: LICENSE
|
|
14
14
|
License-File: LICENSE-APACHE
|
|
15
|
-
Keywords: calibration,classification,clinical,diagnostic accuracy,evaluation,mAP,machine learning,metrics,object detection,regression,reproducibility,segmentation,statistical tests,statistics
|
|
15
|
+
Keywords: calibration,classification,clinical,diagnostic accuracy,evaluation,mAP,machine learning,metrics,object detection,regression,reproducibility,rust,segmentation,statistical tests,statistics
|
|
16
16
|
Classifier: Development Status :: 5 - Production/Stable
|
|
17
17
|
Classifier: Intended Audience :: Developers
|
|
18
18
|
Classifier: Intended Audience :: Healthcare Industry
|
|
@@ -26,6 +26,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.12
|
|
27
27
|
Classifier: Programming Language :: Python :: 3.13
|
|
28
28
|
Classifier: Programming Language :: Python :: 3.14
|
|
29
|
+
Classifier: Programming Language :: Rust
|
|
29
30
|
Classifier: Topic :: Scientific/Engineering
|
|
30
31
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
31
32
|
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
@@ -84,7 +85,9 @@ Description-Content-Type: text/markdown
|
|
|
84
85
|
EvalSuite brings classification, regression, clinical, statistical, segmentation and object-detection
|
|
85
86
|
evaluation into one consistent, validated, documented framework.
|
|
86
87
|
|
|
87
|
-
> **Status: stable (0.
|
|
88
|
+
> **Status: stable (0.6.0).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
|
|
89
|
+
> **0.6.0 adds a compiled Rust core**: same API and identical results, with text metrics, COCO matching and
|
|
90
|
+
> bootstrap resampling several times faster (prebuilt wheels for Linux, macOS and Windows).
|
|
88
91
|
> **LLM systems arrive in 0.5.0**: safety, robustness, calibration and uncertainty, agents and tool use,
|
|
89
92
|
> multilingual, code generation, long context and summarization, and inference efficiency and cost.
|
|
90
93
|
|
|
@@ -100,6 +103,12 @@ The package is installed as `evalsuite-python` and imported as `evalsuite`:
|
|
|
100
103
|
import evalsuite as es
|
|
101
104
|
```
|
|
102
105
|
|
|
106
|
+
EvalSuite has a **compiled core written in Rust**. pip installs a prebuilt wheel on Linux (x86_64, aarch64;
|
|
107
|
+
glibc and musl), macOS (Apple silicon, Intel) and Windows (x64, arm64) for Python 3.9 to 3.14, so no compiler
|
|
108
|
+
is needed. Anywhere else pip falls back to a pure-Python wheel that gives exactly the same results, more slowly.
|
|
109
|
+
`evalsuite._native.backend()` says which one is in use (`"rust"` or `"python"`), and
|
|
110
|
+
`EVALSUITE_PURE_PYTHON=1` selects the Python implementations on any install.
|
|
111
|
+
|
|
103
112
|
## Why EvalSuite
|
|
104
113
|
|
|
105
114
|
- **One consistent API.** Every metric returns a result object that behaves like a number and exports to
|
|
@@ -340,50 +349,53 @@ Input files can be CSV, TSV, Parquet or JSON. Output format follows `--format` o
|
|
|
340
349
|
|
|
341
350
|
## Performance
|
|
342
351
|
|
|
343
|
-
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.
|
|
352
|
+
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.6.0, Python 3.13,
|
|
344
353
|
NumPy 2.5, Linux x86_64). **Overall: 81 of 81 rows agree with the reference** (largest
|
|
345
|
-
difference 2.
|
|
346
|
-
27 cases and three sizes is **3.
|
|
354
|
+
difference 2.8e-14), 81 are faster, and the geometric-mean speed-up across all
|
|
355
|
+
27 cases and three sizes is **3.70×**. At 1,000,000 samples (pixels for
|
|
347
356
|
segmentation; 1,000 images for detection and 50 for Hausdorff; 10,000 examples for the LLM cases), in
|
|
348
357
|
alphabetical order:
|
|
349
358
|
|
|
350
359
|
| Case | Reference | EvalSuite (ms) | Reference (ms) | Speed-up |
|
|
351
360
|
| --- | --- | ---: | ---: | ---: |
|
|
352
|
-
| 10 classes: macro F1 | scikit-learn |
|
|
353
|
-
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.
|
|
354
|
-
| binary: 8 label metrics via evaluate() | scikit-learn |
|
|
355
|
-
| binary: ROC AUC | scikit-learn |
|
|
356
|
-
| calibration: slope and intercept | statsmodels |
|
|
357
|
-
| clinical: diagnostic report (7 CIs) | statsmodels |
|
|
358
|
-
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn |
|
|
359
|
-
| decision curve: 99 thresholds | NumPy loop | 149.
|
|
360
|
-
| detection: COCO evaluation (1000 images) | pycocotools |
|
|
361
|
-
| multiple testing: Hochberg (n p-values) | statsmodels |
|
|
362
|
-
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn |
|
|
363
|
-
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx |
|
|
364
|
-
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn |
|
|
365
|
-
| segmentation: Hausdorff distance (50 images) | SciPy |
|
|
366
|
-
| statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **
|
|
367
|
-
| statistics: Mann–Whitney U | SciPy |
|
|
368
|
-
| statistics: Welch t-test | SciPy | 7.
|
|
369
|
-
| structured: JSON Schema compliance (10000 documents) | jsonschema |
|
|
370
|
-
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu |
|
|
371
|
-
| systems: confidence AUROC (n answers) | scikit-learn |
|
|
372
|
-
| systems: distribution-shift drop, Welch CI (n scores) | SciPy |
|
|
373
|
-
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema |
|
|
374
|
-
| systems: latency p50 / p95 / p99 (n requests) | NumPy |
|
|
375
|
-
| systems: maintainability index (1000 programs) | radon |
|
|
376
|
-
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU |
|
|
377
|
-
| text: METEOR, exact and stem matches (10000 sentences) | NLTK |
|
|
378
|
-
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score |
|
|
361
|
+
| 10 classes: macro F1 | scikit-learn | 10.2 | 107.4 | **10.5×** |
|
|
362
|
+
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.3 | 2.9 | **2.3×** |
|
|
363
|
+
| binary: 8 label metrics via evaluate() | scikit-learn | 11.2 | 818.5 | **73.1×** |
|
|
364
|
+
| binary: ROC AUC | scikit-learn | 175.4 | 292.8 | **1.7×** |
|
|
365
|
+
| calibration: slope and intercept | statsmodels | 234.7 | 938.0 | **4.0×** |
|
|
366
|
+
| clinical: diagnostic report (7 CIs) | statsmodels | 4.3 | 4.4 | **1.0×** |
|
|
367
|
+
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 18.8 | 309.7 | **16.5×** |
|
|
368
|
+
| decision curve: 99 thresholds | NumPy loop | 149.3 | 230.1 | **1.5×** |
|
|
369
|
+
| detection: COCO evaluation (1000 images) | pycocotools | 268.5 | 628.8 | **2.3×** |
|
|
370
|
+
| multiple testing: Hochberg (n p-values) | statsmodels | 69.4 | 81.2 | **1.2×** |
|
|
371
|
+
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 7.4 | 12.0 | **1.6×** |
|
|
372
|
+
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 121.7 | 546.7 | **4.5×** |
|
|
373
|
+
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 34.2 | 200.8 | **5.9×** |
|
|
374
|
+
| segmentation: Hausdorff distance (50 images) | SciPy | 11.0 | 13.4 | **1.2×** |
|
|
375
|
+
| statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **12.0×** |
|
|
376
|
+
| statistics: Mann–Whitney U | SciPy | 152.1 | 323.0 | **2.1×** |
|
|
377
|
+
| statistics: Welch t-test | SciPy | 7.7 | 11.6 | **1.5×** |
|
|
378
|
+
| structured: JSON Schema compliance (10000 documents) | jsonschema | 88.9 | 224.7 | **2.5×** |
|
|
379
|
+
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 385.3 | 505.1 | **1.3×** |
|
|
380
|
+
| systems: confidence AUROC (n answers) | scikit-learn | 166.0 | 265.3 | **1.6×** |
|
|
381
|
+
| systems: distribution-shift drop, Welch CI (n scores) | SciPy | 10.8 | 12.1 | **1.1×** |
|
|
382
|
+
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 79.1 | 209.2 | **2.6×** |
|
|
383
|
+
| systems: latency p50 / p95 / p99 (n requests) | NumPy | 13.7 | 15.4 | **1.1×** |
|
|
384
|
+
| systems: maintainability index (1000 programs) | radon | 84.5 | 93.4 | **1.1×** |
|
|
385
|
+
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 215.2 | 1962.8 | **9.1×** |
|
|
386
|
+
| text: METEOR, exact and stem matches (10000 sentences) | NLTK | 71.0 | 363.4 | **5.1×** |
|
|
387
|
+
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 154.6 | 608.3 | **3.9×** |
|
|
379
388
|
|
|
380
389
|
**Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`): all 225 registered metrics and
|
|
381
390
|
statistics functions at 10,000 and 100,000 samples. 86 are compared with a reference library, 118 with an
|
|
382
391
|
independent textbook formula and 21 (learned, judge-dependent or randomised) are timed alone; **all 204
|
|
383
|
-
comparisons agree**, and against the libraries the geometric-mean speed-up is **
|
|
392
|
+
comparisons agree**, and against the libraries the geometric-mean speed-up is **5.99×** (172 of 172
|
|
384
393
|
measurements faster). Per-metric table in BENCHMARKS.md.
|
|
385
394
|
|
|
386
|
-
**Every row is faster than its reference.**
|
|
395
|
+
**Every row is faster than its reference.** The text metrics (BLEU, chrF, TER, ROUGE, METEOR), COCO
|
|
396
|
+
matching and bootstrap resampling run in the compiled Rust core; bootstrap intervals, paired bootstrap tests and
|
|
397
|
+
`compare()` evaluate confusion-matrix metrics from counts of each resample's (true, predicted) pairs instead of
|
|
398
|
+
copies of the data. `evaluate()` validates inputs once and builds the confusion
|
|
387
399
|
matrix once for all metrics, and integer labels are encoded without sorting. The rank tests rank the data once
|
|
388
400
|
with a single unstable sort; t-tests, χ², Fisher and McNemar compute their statistics directly, and
|
|
389
401
|
Shapiro–Wilk caches its weights per sample size. Percentiles select exactly from a small bracketed window
|
|
@@ -460,13 +472,21 @@ throughput, token usage, cost, resource utilization, energy per request, request
|
|
|
460
472
|
|
|
461
473
|
## Development
|
|
462
474
|
|
|
475
|
+
Building from source needs a Rust toolchain ([rustup](https://rustup.rs)); the compiled core is in `rust/`
|
|
476
|
+
(`evalsuite-core`, pure Rust, and `evalsuite-py`, the PyO3 bindings), built by maturin.
|
|
477
|
+
|
|
463
478
|
```bash
|
|
464
479
|
python -m venv .venv && source .venv/bin/activate
|
|
465
|
-
pip install -e ".[dev]"
|
|
480
|
+
pip install -e ".[dev]" # builds the Rust core into evalsuite._core
|
|
466
481
|
pytest --cov=evalsuite
|
|
482
|
+
EVALSUITE_PURE_PYTHON=1 pytest -q # the same suite without the compiled core
|
|
467
483
|
ruff check . && ruff format --check . && mypy
|
|
484
|
+
cargo test --manifest-path rust/Cargo.toml -p evalsuite-core
|
|
468
485
|
```
|
|
469
486
|
|
|
487
|
+
Every compiled kernel is a port of a Python implementation that stays in the package as the reference and
|
|
488
|
+
fallback; `tests/test_native.py` checks that the two give identical results. See CONTRIBUTING.md.
|
|
489
|
+
|
|
470
490
|
## Links
|
|
471
491
|
|
|
472
492
|
- PyPI: https://pypi.org/project/evalsuite-python/
|
|
@@ -2,13 +2,14 @@ evalsuite/__init__.py,sha256=nMwLJq_Ni8plZZmq1olG5HwDlBppn0pW-RJyFBzPF7o,5630
|
|
|
2
2
|
evalsuite/__main__.py,sha256=Nq90_8VlUN1mif-AVgX-kZRL63bd94F5-F7F9UkVZD4,117
|
|
3
3
|
evalsuite/_bench_metrics.py,sha256=GLLa9OhCNmu6IyWkxC0AcNf7p-CTpoOwWUS99C1o2o8,75792
|
|
4
4
|
evalsuite/_lazy.py,sha256=Ddq0uWuiyxtsT0jBtCSITQPvttiQ7znXAbjkMIOVefk,901
|
|
5
|
+
evalsuite/_native.py,sha256=DiJNSz1oCuDd3rZSSsTQOii2jYp3sZtVePxWtRhcAik,2076
|
|
5
6
|
evalsuite/api.py,sha256=DzWwmCgyEiqO2HvPrNg2RIDzqwap4e_UvbxA7PkJ3fE,10227
|
|
6
7
|
evalsuite/benchmarks.py,sha256=TWXIhdYPbdDPanCOFL1lRCo3ppRYaDF58PB-o3ZZyTA,37846
|
|
7
8
|
evalsuite/calibration.py,sha256=jhCPOmCFGEkUkcx-hSAIb-JCMq9oF6JZt4uDGvg5NaU,15083
|
|
8
9
|
evalsuite/plot.py,sha256=7eOyzoRbg6Aad6OhtIQG3laIioQ8fs2K0YzodjG5rHA,26049
|
|
9
10
|
evalsuite/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
11
|
evalsuite/reporting.py,sha256=-LISv9vvEnltT26GtzLjVlxOCcAwmjv4-HyB8_1UF5o,9615
|
|
11
|
-
evalsuite/version.py,sha256=
|
|
12
|
+
evalsuite/version.py,sha256=WXIiUQKq6Bg6972-sqjn2TWeu8-Z3B72WfcDxJHyJ3c,98
|
|
12
13
|
evalsuite/classification/__init__.py,sha256=ErBIXbBGnhfW6v-1Cn5SegiERoyxNlmO1tEKcLM15mA,833
|
|
13
14
|
evalsuite/classification/_common.py,sha256=3ANV33ix_mnOzvOAG8glyJO-iYVhhTGO0S3YG0ZddB8,4543
|
|
14
15
|
evalsuite/classification/metrics.py,sha256=h-DYF2wwdN8LA1bPbyIgkfuG4ovwBBgtGZFObEmiHzE,37044
|
|
@@ -38,17 +39,17 @@ evalsuite/llmsys/uncertainty.py,sha256=Brm_LT8qHb-EtcPe7YBXq7HYMSTG93OkT3Cnx2SYB
|
|
|
38
39
|
evalsuite/regression/__init__.py,sha256=t2XEHUw6e5tyWBHcEeiog2WWd-wwaxf4m5AIX8dJyng,571
|
|
39
40
|
evalsuite/regression/metrics.py,sha256=Qv5hFswxfzE-8wOKysERqsEJT-3kvTXPrkLoZ7s9jbQ,23487
|
|
40
41
|
evalsuite/stats/__init__.py,sha256=mtnEqpvlvscQ3C6ceRr8xLKoSHPQWsWB24pEVlvp6fs,1187
|
|
41
|
-
evalsuite/stats/_resolve.py,sha256=
|
|
42
|
+
evalsuite/stats/_resolve.py,sha256=T5EUqTbiGM0oor59Nzm18GUr7oLWcpgj1l8gCU56ACc,10276
|
|
42
43
|
evalsuite/stats/compare.py,sha256=TzBYHDbfHU1Uz2FtgXbMATTnmHuaDGUbrV9Eq4IphZY,18311
|
|
43
44
|
evalsuite/stats/effect.py,sha256=bgnhdCI4vU_Wnv5q7G2ncmtN3n7N1GWiYO4iO3FDI0w,7286
|
|
44
45
|
evalsuite/stats/hypothesis.py,sha256=RCu8yPTOhtetFQ5TlZQWaFu2t-aq56ffaNlEqC-lJbg,24546
|
|
45
|
-
evalsuite/stats/intervals.py,sha256=
|
|
46
|
+
evalsuite/stats/intervals.py,sha256=KyExUlrZiJiMkCRaDNUQoDY30hSrv3SNRQzR8oJucqU,14660
|
|
46
47
|
evalsuite/stats/paired.py,sha256=PZV0XED3HnjOD675Tj6z1ILGxUaesBpxXQgC0goi6o4,8439
|
|
47
48
|
evalsuite/stats/results.py,sha256=nqXHUiW8l0fQJkbMiunU6Gz-2be1NApZ6Fif2B1K_Yw,4407
|
|
48
49
|
evalsuite/text/__init__.py,sha256=_r0Qi6X7cBcaYMAPRyC15CsTj9Tv8VcqMCtLiSJPogY,3632
|
|
49
50
|
evalsuite/text/_common.py,sha256=acjAoPbXlPtd4DC4YbvOv1frIUjvFa1UtbdA5-6YDsU,3790
|
|
50
51
|
evalsuite/text/factuality.py,sha256=Id8LnGjqvaVDYC5qMn4H0UJdjrwp1VrZ_zr_0jct8SM,20772
|
|
51
|
-
evalsuite/text/generation.py,sha256=
|
|
52
|
+
evalsuite/text/generation.py,sha256=3Fm-VpzLEQMUfz59j4QVUbEBorq2-oTzLtJ4YaxzoYI,51659
|
|
52
53
|
evalsuite/text/judge.py,sha256=Ug5UnXBHzPkhtJ-vBxge3ZbkQxCoA4T_zcVxVU8chxQ,23566
|
|
53
54
|
evalsuite/text/qa.py,sha256=rU0ya8TzV5mp7UiWq7w9IqSN9B0tDv8xymSaRzzbzMw,4097
|
|
54
55
|
evalsuite/text/rag.py,sha256=GF8GUp6Vnt9peBCIcdvFUapLUL36_NDApZisYG_rcqg,9641
|
|
@@ -59,11 +60,11 @@ evalsuite/text/semantic.py,sha256=TgBBDcRll7vMzQVYStgt1SS9G7e6FTf7SuZDcPL32_g,23
|
|
|
59
60
|
evalsuite/text/spice.py,sha256=rdPCeilqKkXLMiSAE-rYOn0Zt2nKFum5Tf1oJdE6k-U,6847
|
|
60
61
|
evalsuite/text/structured.py,sha256=x08yYf2rdlmiA_D_dI1L-fc9quHiBPMKgAGQbG3kJr8,31981
|
|
61
62
|
evalsuite/vision/__init__.py,sha256=9gpOBTPveM_srE6BM-SgCssdQurya2LPHhoMLGOh2A0,991
|
|
62
|
-
evalsuite/vision/detection.py,sha256=
|
|
63
|
+
evalsuite/vision/detection.py,sha256=nkTisC02xOupKNfXiJyk-oaFlYYLJZU7VXkR1fu2Ph4,29747
|
|
63
64
|
evalsuite/vision/segmentation.py,sha256=f41Q8iOELCj8jmAJ3pN5OFr3h3-6QtjnluW8rfkg0V0,41132
|
|
64
|
-
evalsuite_python-0.
|
|
65
|
-
evalsuite_python-0.
|
|
66
|
-
evalsuite_python-0.
|
|
67
|
-
evalsuite_python-0.
|
|
68
|
-
evalsuite_python-0.
|
|
69
|
-
evalsuite_python-0.
|
|
65
|
+
evalsuite_python-0.6.0.dist-info/METADATA,sha256=QDTBE4eRquf4uCJn3IivEmyQn2drPgSwIBDIzV7euL8,27606
|
|
66
|
+
evalsuite_python-0.6.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
67
|
+
evalsuite_python-0.6.0.dist-info/entry_points.txt,sha256=YYIwisn4L4sQt3ntzbM0_Z4yZE2KCu3GJ6KfWL1kIwc,54
|
|
68
|
+
evalsuite_python-0.6.0.dist-info/licenses/LICENSE,sha256=cRRQ6Kk8w2qCqtDSSUJQGy-0rqjmjJG09cZ6iIiMvdc,1095
|
|
69
|
+
evalsuite_python-0.6.0.dist-info/licenses/LICENSE-APACHE,sha256=K4pWYv3dt61u1BuIxjOGBxhgRkpsH4X_dzeIbOILXw0,10784
|
|
70
|
+
evalsuite_python-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{evalsuite_python-0.5.5.dist-info → evalsuite_python-0.6.0.dist-info}/licenses/LICENSE-APACHE
RENAMED
|
File without changes
|