evalsuite-python 0.4.1__tar.gz → 0.5.1__tar.gz
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_python-0.4.1 → evalsuite_python-0.5.1}/CHANGELOG.md +50 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/PKG-INFO +90 -34
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/README.md +88 -33
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/pyproject.toml +2 -1
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/__init__.py +5 -1
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/_bench_metrics.py +692 -3
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/benchmarks.py +129 -3
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/cli/main.py +3 -3
- evalsuite_python-0.5.1/src/evalsuite/llmsys/__init__.py +189 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/_common.py +139 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/agents.py +384 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/code.py +914 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/efficiency.py +347 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/longcontext.py +361 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/multilingual.py +327 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/robustness.py +504 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/safety.py +509 -0
- evalsuite_python-0.5.1/src/evalsuite/llmsys/uncertainty.py +229 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/__init__.py +2 -0
- evalsuite_python-0.5.1/src/evalsuite/text/spice.py +162 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/version.py +1 -1
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/integration/test_readme_examples.py +2 -0
- evalsuite_python-0.5.1/tests/llmsys/test_code_longcontext_efficiency.py +340 -0
- evalsuite_python-0.5.1/tests/llmsys/test_edges.py +88 -0
- evalsuite_python-0.5.1/tests/llmsys/test_safety_robustness.py +265 -0
- evalsuite_python-0.5.1/tests/llmsys/test_uncertainty_agents_multilingual.py +195 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/output/test_benchmarks.py +11 -2
- evalsuite_python-0.5.1/tests/vision/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/.gitignore +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/CONTRIBUTING.md +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/LICENSE +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/__main__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/api.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/calibration.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/classification/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/classification/_common.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/classification/metrics.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/cli/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/clinical/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/clinical/metrics.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/clinical/report.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/context.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/exceptions.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/export.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/registry.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/result.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/types.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/core/validation.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/plot.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/py.typed +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/regression/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/regression/metrics.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/reporting.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/_resolve.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/compare.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/effect.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/hypothesis.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/intervals.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/paired.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/stats/results.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/_common.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/factuality.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/generation.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/judge.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/qa.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/rag.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/reasoning.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/report.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/retrieval.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/semantic.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/text/structured.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/vision/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/vision/detection.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/src/evalsuite/vision/segmentation.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/classification/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/classification/test_against_sklearn.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/clinical/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/clinical/test_outputs.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/clinical/test_v020.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/conftest.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/integration/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/integration/test_qa.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/integration/test_repo_hygiene.py +0 -0
- {evalsuite_python-0.4.1/tests/output → evalsuite_python-0.5.1/tests/llmsys}/__init__.py +0 -0
- {evalsuite_python-0.4.1/tests/regression → evalsuite_python-0.5.1/tests/output}/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/output/test_cli.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/output/test_plot.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/output/test_reporting.py +0 -0
- {evalsuite_python-0.4.1/tests/stats → evalsuite_python-0.5.1/tests/regression}/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/regression/test_against_sklearn.py +0 -0
- {evalsuite_python-0.4.1/tests/text → evalsuite_python-0.5.1/tests/stats}/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/stats/test_branches.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/stats/test_compare.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/stats/test_reference.py +0 -0
- {evalsuite_python-0.4.1/tests/unit → evalsuite_python-0.5.1/tests/text}/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/text/test_against_references.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/text/test_text_edges.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/text/test_v040.py +0 -0
- {evalsuite_python-0.4.1/tests/vision → evalsuite_python-0.5.1/tests/unit}/__init__.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/unit/test_core.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/unit/test_edges.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/vision/test_detection.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/vision/test_edges.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/vision/test_outputs.py +0 -0
- {evalsuite_python-0.4.1 → evalsuite_python-0.5.1}/tests/vision/test_segmentation.py +0 -0
|
@@ -6,6 +6,56 @@ All notable changes to this project are documented here. The format follows
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.5.1] - 2026-10-10
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `evalsuite benchmark --suite llmsys` (and `run_benchmarks(suite="llmsys")`): v0.5 LLM-systems workloads
|
|
13
|
+
against radon, the codebleu package, scikit-learn, jsonschema, SciPy and NumPy; included in `--suite all`
|
|
14
|
+
(27 cases, 81 measurements, all agreeing with their reference).
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- LLM-systems metrics accept NumPy arrays without converting them to Python lists first (much faster on
|
|
18
|
+
large inputs); `confidence_accuracy_correlation` computes Spearman from the ranks it already has.
|
|
19
|
+
|
|
20
|
+
## [0.5.0] - 2026-10-10
|
|
21
|
+
|
|
22
|
+
LLM systems (the v0.5.0 roadmap: 8 areas, 85 items) and SPICE. No existing API changed.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- `es.llmsys` (all functions also at top level): 77 new registered metrics. Items on the roadmap that an
|
|
26
|
+
existing function already covers (ECE, MCE, Brier, log loss, abstention, pass@k, BLEU/chrF/COMET,
|
|
27
|
+
ROUGE-L/BERTScore, tool-call precision/recall, Recall@k/MRR) are documented as such.
|
|
28
|
+
- Safety: harmful-response / unsafe-compliance, refusal and appropriate refusal, over-refusal, jailbreak /
|
|
29
|
+
prompt-injection attack success, red-team success@k, expected maximum toxicity and toxicity probability
|
|
30
|
+
(RealToxicityPrompts) with per-attribute scores, CrowS-Pairs stereotype preference, WEAT effect size with
|
|
31
|
+
a permutation test, PII leakage (built-in e-mail, phone, Luhn-checked card, IPv4, SSN detectors plus
|
|
32
|
+
protected strings; `detect_pii`), memorization exposure (Carlini et al.), policy violations.
|
|
33
|
+
- Robustness: adversarial and typo-noise robustness (`add_typos`), OOD accuracy, distribution-shift drop
|
|
34
|
+
with a Welch interval (= SciPy), paraphrase consistency, counterfactual invariance violations, response
|
|
35
|
+
stability, contradiction rate, failure / timeout / error rate, recovery rate, prompt sensitivity, accuracy
|
|
36
|
+
slope against context length.
|
|
37
|
+
- Uncertainty: adaptive calibration error, risk-coverage curve, AURC and E-AURC, selective risk, risk at
|
|
38
|
+
coverage, coverage at risk, confidence AUROC (= scikit-learn).
|
|
39
|
+
- Agents: task completion and progress, invalid tool calls checked against each tool's JSON Schema,
|
|
40
|
+
execution failures, tool-use efficiency, steps per task, plan adherence (LCS), joint goal and slot
|
|
41
|
+
accuracy, tool-failure recovery, repeated-call and loop rates, human intervention, cost per success.
|
|
42
|
+
- Multilingual: language-ID accuracy and macro-F1, bitext mining (cosine or margin), language parity,
|
|
43
|
+
code-switching robustness, z-normalised direct assessment, cultural appropriateness, language consistency,
|
|
44
|
+
cross-lingual consistency.
|
|
45
|
+
- Code: unit-test pass rate, syntax validity (parsed, never run), static-analysis violations per KLOC,
|
|
46
|
+
execution success, test coverage, patch acceptance and bug reproduction, SWE-bench resolved rate,
|
|
47
|
+
security findings by severity, EffiBench NET / NMU, CodeBLEU (n-gram terms identical to the `codebleu`
|
|
48
|
+
package; syntax and data-flow terms from Python's `ast`), cyclomatic complexity and maintainability index
|
|
49
|
+
(identical to radon on every module of EvalSuite and radon).
|
|
50
|
+
- Long context: accuracy by length with effective length (RULER), needle-in-a-haystack grid, accuracy by
|
|
51
|
+
position, lost-in-the-middle gap, context utilization, summary coverage and factual consistency,
|
|
52
|
+
compression ratio, citation coverage, cross-document consistency.
|
|
53
|
+
- Efficiency: TTFT, TPOT, latency percentiles, throughput, token usage, cost (with cached-token pricing),
|
|
54
|
+
resource utilization, energy per request, requests per second, availability and error budget.
|
|
55
|
+
- `es.spice`: SPICE from scene-graph tuples or any `parser`, with exact, WordNet or custom synonym matching
|
|
56
|
+
and object / attribute / relation F-scores. Runs without Java.
|
|
57
|
+
- Benchmarks: `suite="metrics"` covers all 225 metrics and statistics functions; new "LLM systems" group.
|
|
58
|
+
|
|
9
59
|
## [0.4.1] - 2026-10-09
|
|
10
60
|
|
|
11
61
|
Benchmarks for every metric. No API changed.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: evalsuite-python
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.1
|
|
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
|
|
@@ -55,6 +55,7 @@ Requires-Dist: pycocoevalcap>=1.2; extra == 'dev'
|
|
|
55
55
|
Requires-Dist: pycocotools>=2.0.7; extra == 'dev'
|
|
56
56
|
Requires-Dist: pytest-cov>=4; extra == 'dev'
|
|
57
57
|
Requires-Dist: pytest>=7; extra == 'dev'
|
|
58
|
+
Requires-Dist: radon>=6; extra == 'dev'
|
|
58
59
|
Requires-Dist: ranx>=0.3.19; (python_version < '3.14') and extra == 'dev'
|
|
59
60
|
Requires-Dist: rouge-score>=0.1.2; extra == 'dev'
|
|
60
61
|
Requires-Dist: ruff>=0.6; extra == 'dev'
|
|
@@ -82,9 +83,9 @@ Description-Content-Type: text/markdown
|
|
|
82
83
|
EvalSuite brings classification, regression, clinical, statistical, segmentation and object-detection
|
|
83
84
|
evaluation into one consistent, validated, documented framework.
|
|
84
85
|
|
|
85
|
-
> **Status: stable (0.
|
|
86
|
-
>
|
|
87
|
-
>
|
|
86
|
+
> **Status: stable (0.5.1).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
|
|
87
|
+
> **LLM systems arrive in 0.5.0**: safety, robustness, calibration and uncertainty, agents and tool use,
|
|
88
|
+
> multilingual, code generation, long context and summarization, and inference efficiency and cost.
|
|
88
89
|
|
|
89
90
|
## Installation
|
|
90
91
|
|
|
@@ -254,6 +255,32 @@ es.json_schema_compliance(outputs, schema) # also tool_call_f1, instruction_com
|
|
|
254
255
|
es.pass_at_k(n_samples, n_correct, k=10) # also benchmark_accuracy(..., style="gsm8k")
|
|
255
256
|
es.compare(references, {"a": preds_a, "b": preds_b}, metrics=["bleu", "rouge_l"]) # paired over examples
|
|
256
257
|
es.plot.ratings(comparisons) # Bradley–Terry leaderboard with intervals; also win_matrix, text_scores
|
|
258
|
+
es.spice(reference_tuples, candidate_tuples) # scene-graph F-score; parser= for captions, synonyms="wordnet"
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## LLM systems
|
|
262
|
+
|
|
263
|
+
Safety, robustness, uncertainty, agents, multilingual, code, long context and serving cost. The verdicts
|
|
264
|
+
these take (harmful or not, test passed or not, confidence) come from your own judge, classifier or sandbox;
|
|
265
|
+
EvalSuite turns them into rates with Wilson intervals and breakdowns. PII detection, CodeBLEU, cyclomatic
|
|
266
|
+
complexity and the maintainability index (identical to radon) are computed from the text itself, and
|
|
267
|
+
EvalSuite never executes generated code.
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
import evalsuite as es
|
|
271
|
+
|
|
272
|
+
es.harmful_response_rate([True, False, False, True], harmful_prompt=[True, True, False, True])
|
|
273
|
+
es.over_refusal_rate(refused=[True, False, True], should_refuse=[True, False, False])
|
|
274
|
+
es.pii_leakage_rate(["mail me at a@b.io", "nothing here"]) # e-mail, phone, Luhn-checked cards, IPs
|
|
275
|
+
es.paraphrase_consistency([["Paris", "paris"], ["4", "5", "4"]])
|
|
276
|
+
es.aurc(correct=[True, True, False, True], confidence=[0.9, 0.8, 0.7, 0.4]) # also selective_risk
|
|
277
|
+
es.plan_adherence(plans=[["search", "read", "answer"]], executed=[["search", "answer"]])
|
|
278
|
+
es.language_parity({"en": [1, 1, 0, 1], "sw": [1, 0, 0, 1]})
|
|
279
|
+
es.codebleu(["def add(a, b):\n return a + b"], ["def add(x, y):\n return x + y"])
|
|
280
|
+
es.code_complexity(["def f(x):\n return 1 if x else 0"]) # cyclomatic complexity + maintainability
|
|
281
|
+
es.needle_in_haystack(correct=[1, 0, 1, 1], context_lengths=[4000, 4000, 8000, 8000], depths=[0, 0.5, 0, 0.5])
|
|
282
|
+
es.time_to_first_token(request_times=[0.0, 1.0], first_token_times=[0.21, 1.35])
|
|
283
|
+
es.inference_cost([1200, 800], [300, 150], input_price=3.0, output_price=15.0) # prices per 1M tokens
|
|
257
284
|
```
|
|
258
285
|
|
|
259
286
|
## Classification report
|
|
@@ -312,41 +339,47 @@ Input files can be CSV, TSV, Parquet or JSON. Output format follows `--format` o
|
|
|
312
339
|
|
|
313
340
|
## Performance
|
|
314
341
|
|
|
315
|
-
Benchmarked against reference implementations on the same data (fastest of 5 runs;
|
|
316
|
-
Linux x86_64). **Overall:
|
|
317
|
-
difference
|
|
318
|
-
|
|
342
|
+
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.1, Python 3.13,
|
|
343
|
+
NumPy 2.5, Linux x86_64). **Overall: 81 of 81 rows agree with the reference** (largest
|
|
344
|
+
difference 2.5e-14), 56 are faster, and the geometric-mean speed-up across all
|
|
345
|
+
27 cases and three sizes is **1.89×**. At 1,000,000 samples (pixels for
|
|
319
346
|
segmentation; 1,000 images for detection and 50 for Hausdorff; 10,000 examples for the LLM cases), in
|
|
320
347
|
alphabetical order:
|
|
321
348
|
|
|
322
349
|
| Case | Reference | EvalSuite (ms) | Reference (ms) | Speed-up |
|
|
323
350
|
| --- | --- | ---: | ---: | ---: |
|
|
324
|
-
| 10 classes: macro F1 | scikit-learn |
|
|
325
|
-
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff |
|
|
326
|
-
| binary: 8 label metrics via evaluate() | scikit-learn |
|
|
327
|
-
| binary: ROC AUC | scikit-learn |
|
|
328
|
-
| calibration: slope and intercept | statsmodels |
|
|
329
|
-
| clinical: diagnostic report (7 CIs) | statsmodels |
|
|
330
|
-
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn |
|
|
331
|
-
| decision curve: 99 thresholds | NumPy loop |
|
|
332
|
-
| detection: COCO evaluation (1000 images) | pycocotools |
|
|
333
|
-
| multiple testing: Hochberg (n p-values) | statsmodels |
|
|
334
|
-
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn |
|
|
335
|
-
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx |
|
|
336
|
-
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn |
|
|
337
|
-
| segmentation: Hausdorff distance (50 images) | SciPy |
|
|
338
|
-
| statistics: Cramér's V (5×5 table) | SciPy | 0.
|
|
339
|
-
| statistics: Mann–Whitney U | SciPy |
|
|
340
|
-
| statistics: Welch t-test | SciPy |
|
|
341
|
-
| structured: JSON Schema compliance (10000 documents) | jsonschema |
|
|
342
|
-
|
|
|
343
|
-
|
|
|
344
|
-
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
351
|
+
| 10 classes: macro F1 | scikit-learn | 41.5 | 137.6 | **3.3×** |
|
|
352
|
+
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 4.5 | 4.5 | **1.0×** |
|
|
353
|
+
| binary: 8 label metrics via evaluate() | scikit-learn | 49.4 | 1056.8 | **21.4×** |
|
|
354
|
+
| binary: ROC AUC | scikit-learn | 200.3 | 338.5 | **1.7×** |
|
|
355
|
+
| calibration: slope and intercept | statsmodels | 344.3 | 1541.7 | **4.5×** |
|
|
356
|
+
| clinical: diagnostic report (7 CIs) | statsmodels | 33.5 | 9.6 | 0.29× |
|
|
357
|
+
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 137.9 | 438.1 | **3.2×** |
|
|
358
|
+
| decision curve: 99 thresholds | NumPy loop | 172.1 | 236.2 | **1.4×** |
|
|
359
|
+
| detection: COCO evaluation (1000 images) | pycocotools | 1147.9 | 1351.0 | **1.2×** |
|
|
360
|
+
| multiple testing: Hochberg (n p-values) | statsmodels | 91.9 | 98.4 | **1.1×** |
|
|
361
|
+
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 32.0 | 22.6 | 0.71× |
|
|
362
|
+
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 248.6 | 897.0 | **3.6×** |
|
|
363
|
+
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 51.6 | 289.5 | **5.6×** |
|
|
364
|
+
| segmentation: Hausdorff distance (50 images) | SciPy | 31.9 | 23.8 | 0.75× |
|
|
365
|
+
| statistics: Cramér's V (5×5 table) | SciPy | 0.3 | 0.3 | 0.95× |
|
|
366
|
+
| statistics: Mann–Whitney U | SciPy | 390.3 | 425.8 | **1.1×** |
|
|
367
|
+
| statistics: Welch t-test | SciPy | 37.7 | 16.3 | 0.43× |
|
|
368
|
+
| structured: JSON Schema compliance (10000 documents) | jsonschema | 159.4 | 371.7 | **2.3×** |
|
|
369
|
+
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 740.3 | 791.9 | **1.1×** |
|
|
370
|
+
| systems: confidence AUROC (n answers) | scikit-learn | 194.4 | 327.7 | **1.7×** |
|
|
371
|
+
| systems: distribution-shift drop, Welch CI (n scores) | SciPy | 13.3 | 16.9 | **1.3×** |
|
|
372
|
+
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 145.0 | 333.2 | **2.3×** |
|
|
373
|
+
| systems: latency p50 / p95 / p99 (n requests) | NumPy | 41.0 | 19.7 | 0.48× |
|
|
374
|
+
| systems: maintainability index (1000 programs) | radon | 138.3 | 168.7 | **1.2×** |
|
|
375
|
+
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 2726.2 | 3121.0 | **1.1×** |
|
|
376
|
+
| text: METEOR, exact and stem matches (10000 sentences) | NLTK | 507.4 | 590.3 | **1.2×** |
|
|
377
|
+
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 1147.3 | 1010.7 | 0.88× |
|
|
378
|
+
|
|
379
|
+
**Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`): all 225 registered metrics and
|
|
380
|
+
statistics functions at 10,000 and 100,000 samples. 86 are compared with a reference library, 118 with an
|
|
381
|
+
independent textbook formula and 21 (learned, judge-dependent or randomised) are timed alone; **all 204
|
|
382
|
+
comparisons agree**, and against the libraries the geometric-mean speed-up is **2.67×** (139 of 172
|
|
350
383
|
measurements faster). Per-metric table in BENCHMARKS.md.
|
|
351
384
|
|
|
352
385
|
`evaluate()` validates inputs once and builds the confusion matrix once for all metrics, which is where most
|
|
@@ -387,6 +420,29 @@ object size, AP per class with COCO or VOC interpolation, precision-recall curve
|
|
|
387
420
|
MSLE, RMSLE, median absolute error, explained variance, max error, mean bias error, quantile (pinball)
|
|
388
421
|
loss, Huber loss, relative absolute error, relative squared error.
|
|
389
422
|
|
|
423
|
+
**LLM evaluation** (0.4.0): BLEU, sentence BLEU, chrF/chrF++, TER, ROUGE-1/2/L/Lsum, METEOR, CIDEr-D, SPICE,
|
|
424
|
+
perplexity, cross-entropy, Distinct-n, Self-BLEU, MAUVE, BERTScore, embedding similarity, MoverScore, learned
|
|
425
|
+
metrics via `model_score`; faithfulness, hallucination rate, groundedness, citation precision/recall, claim
|
|
426
|
+
verification, knowledge consistency, answer correctness/relevance, abstention, exact match, token F1; win
|
|
427
|
+
rate, Bradley–Terry, Elo, Krippendorff's alpha, Fleiss' kappa, judge agreement and biases, rubric scores;
|
|
428
|
+
pass@k, majority vote, benchmark accuracy; Precision/Recall/Hit rate@k, MRR, MAP, NDCG, context precision,
|
|
429
|
+
recall and relevance; JSON / JSON Schema / XML validity, required fields, tool calls, instruction following.
|
|
430
|
+
|
|
431
|
+
**LLM systems** (0.5.0): harmful-response, refusal, over-refusal, attack-success and red-team success rates,
|
|
432
|
+
expected maximum toxicity, CrowS-Pairs stereotype preference, WEAT, PII leakage, memorization exposure,
|
|
433
|
+
policy violations; adversarial, typo-noise, OOD and code-switching robustness, distribution-shift drop,
|
|
434
|
+
paraphrase / counterfactual / cross-lingual consistency, response stability, contradiction rate, failure and
|
|
435
|
+
recovery rates, prompt sensitivity, truncation sensitivity; adaptive calibration error, risk-coverage curve,
|
|
436
|
+
AURC and E-AURC, selective risk, risk at coverage, coverage at risk, confidence AUROC; task completion,
|
|
437
|
+
invalid tool calls, tool-use efficiency, steps per task, plan adherence, state tracking, tool-failure
|
|
438
|
+
recovery, loop rate, human intervention, cost per task; language ID, bitext mining, language parity, direct
|
|
439
|
+
assessment, cultural appropriateness, language consistency; unit-test pass rate, syntax validity, static
|
|
440
|
+
analysis and security findings, execution success, test coverage, patch acceptance, SWE-bench resolved rate,
|
|
441
|
+
CodeBLEU, cyclomatic complexity and maintainability index, runtime efficiency; long-context accuracy by
|
|
442
|
+
length, needle-in-a-haystack grid, position accuracy, lost-in-the-middle gap, context utilization, summary
|
|
443
|
+
coverage, compression ratio, citation coverage, cross-document consistency; TTFT, TPOT, latency percentiles,
|
|
444
|
+
throughput, token usage, cost, resource utilization, energy per request, requests per second, availability.
|
|
445
|
+
|
|
390
446
|
## Conventions
|
|
391
447
|
|
|
392
448
|
- `average="auto"` resolves to `"binary"` for binary targets and `"macro"` otherwise; the resolved value
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
EvalSuite brings classification, regression, clinical, statistical, segmentation and object-detection
|
|
11
11
|
evaluation into one consistent, validated, documented framework.
|
|
12
12
|
|
|
13
|
-
> **Status: stable (0.
|
|
14
|
-
>
|
|
15
|
-
>
|
|
13
|
+
> **Status: stable (0.5.1).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
|
|
14
|
+
> **LLM systems arrive in 0.5.0**: safety, robustness, calibration and uncertainty, agents and tool use,
|
|
15
|
+
> multilingual, code generation, long context and summarization, and inference efficiency and cost.
|
|
16
16
|
|
|
17
17
|
## Installation
|
|
18
18
|
|
|
@@ -182,6 +182,32 @@ es.json_schema_compliance(outputs, schema) # also tool_call_f1, instruction_com
|
|
|
182
182
|
es.pass_at_k(n_samples, n_correct, k=10) # also benchmark_accuracy(..., style="gsm8k")
|
|
183
183
|
es.compare(references, {"a": preds_a, "b": preds_b}, metrics=["bleu", "rouge_l"]) # paired over examples
|
|
184
184
|
es.plot.ratings(comparisons) # Bradley–Terry leaderboard with intervals; also win_matrix, text_scores
|
|
185
|
+
es.spice(reference_tuples, candidate_tuples) # scene-graph F-score; parser= for captions, synonyms="wordnet"
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## LLM systems
|
|
189
|
+
|
|
190
|
+
Safety, robustness, uncertainty, agents, multilingual, code, long context and serving cost. The verdicts
|
|
191
|
+
these take (harmful or not, test passed or not, confidence) come from your own judge, classifier or sandbox;
|
|
192
|
+
EvalSuite turns them into rates with Wilson intervals and breakdowns. PII detection, CodeBLEU, cyclomatic
|
|
193
|
+
complexity and the maintainability index (identical to radon) are computed from the text itself, and
|
|
194
|
+
EvalSuite never executes generated code.
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
import evalsuite as es
|
|
198
|
+
|
|
199
|
+
es.harmful_response_rate([True, False, False, True], harmful_prompt=[True, True, False, True])
|
|
200
|
+
es.over_refusal_rate(refused=[True, False, True], should_refuse=[True, False, False])
|
|
201
|
+
es.pii_leakage_rate(["mail me at a@b.io", "nothing here"]) # e-mail, phone, Luhn-checked cards, IPs
|
|
202
|
+
es.paraphrase_consistency([["Paris", "paris"], ["4", "5", "4"]])
|
|
203
|
+
es.aurc(correct=[True, True, False, True], confidence=[0.9, 0.8, 0.7, 0.4]) # also selective_risk
|
|
204
|
+
es.plan_adherence(plans=[["search", "read", "answer"]], executed=[["search", "answer"]])
|
|
205
|
+
es.language_parity({"en": [1, 1, 0, 1], "sw": [1, 0, 0, 1]})
|
|
206
|
+
es.codebleu(["def add(a, b):\n return a + b"], ["def add(x, y):\n return x + y"])
|
|
207
|
+
es.code_complexity(["def f(x):\n return 1 if x else 0"]) # cyclomatic complexity + maintainability
|
|
208
|
+
es.needle_in_haystack(correct=[1, 0, 1, 1], context_lengths=[4000, 4000, 8000, 8000], depths=[0, 0.5, 0, 0.5])
|
|
209
|
+
es.time_to_first_token(request_times=[0.0, 1.0], first_token_times=[0.21, 1.35])
|
|
210
|
+
es.inference_cost([1200, 800], [300, 150], input_price=3.0, output_price=15.0) # prices per 1M tokens
|
|
185
211
|
```
|
|
186
212
|
|
|
187
213
|
## Classification report
|
|
@@ -240,41 +266,47 @@ Input files can be CSV, TSV, Parquet or JSON. Output format follows `--format` o
|
|
|
240
266
|
|
|
241
267
|
## Performance
|
|
242
268
|
|
|
243
|
-
Benchmarked against reference implementations on the same data (fastest of 5 runs;
|
|
244
|
-
Linux x86_64). **Overall:
|
|
245
|
-
difference
|
|
246
|
-
|
|
269
|
+
Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.1, Python 3.13,
|
|
270
|
+
NumPy 2.5, Linux x86_64). **Overall: 81 of 81 rows agree with the reference** (largest
|
|
271
|
+
difference 2.5e-14), 56 are faster, and the geometric-mean speed-up across all
|
|
272
|
+
27 cases and three sizes is **1.89×**. At 1,000,000 samples (pixels for
|
|
247
273
|
segmentation; 1,000 images for detection and 50 for Hausdorff; 10,000 examples for the LLM cases), in
|
|
248
274
|
alphabetical order:
|
|
249
275
|
|
|
250
276
|
| Case | Reference | EvalSuite (ms) | Reference (ms) | Speed-up |
|
|
251
277
|
| --- | --- | ---: | ---: | ---: |
|
|
252
|
-
| 10 classes: macro F1 | scikit-learn |
|
|
253
|
-
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff |
|
|
254
|
-
| binary: 8 label metrics via evaluate() | scikit-learn |
|
|
255
|
-
| binary: ROC AUC | scikit-learn |
|
|
256
|
-
| calibration: slope and intercept | statsmodels |
|
|
257
|
-
| clinical: diagnostic report (7 CIs) | statsmodels |
|
|
258
|
-
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn |
|
|
259
|
-
| decision curve: 99 thresholds | NumPy loop |
|
|
260
|
-
| detection: COCO evaluation (1000 images) | pycocotools |
|
|
261
|
-
| multiple testing: Hochberg (n p-values) | statsmodels |
|
|
262
|
-
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn |
|
|
263
|
-
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx |
|
|
264
|
-
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn |
|
|
265
|
-
| segmentation: Hausdorff distance (50 images) | SciPy |
|
|
266
|
-
| statistics: Cramér's V (5×5 table) | SciPy | 0.
|
|
267
|
-
| statistics: Mann–Whitney U | SciPy |
|
|
268
|
-
| statistics: Welch t-test | SciPy |
|
|
269
|
-
| structured: JSON Schema compliance (10000 documents) | jsonschema |
|
|
270
|
-
|
|
|
271
|
-
|
|
|
272
|
-
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
+
| 10 classes: macro F1 | scikit-learn | 41.5 | 137.6 | **3.3×** |
|
|
279
|
+
| agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 4.5 | 4.5 | **1.0×** |
|
|
280
|
+
| binary: 8 label metrics via evaluate() | scikit-learn | 49.4 | 1056.8 | **21.4×** |
|
|
281
|
+
| binary: ROC AUC | scikit-learn | 200.3 | 338.5 | **1.7×** |
|
|
282
|
+
| calibration: slope and intercept | statsmodels | 344.3 | 1541.7 | **4.5×** |
|
|
283
|
+
| clinical: diagnostic report (7 CIs) | statsmodels | 33.5 | 9.6 | 0.29× |
|
|
284
|
+
| clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 137.9 | 438.1 | **3.2×** |
|
|
285
|
+
| decision curve: 99 thresholds | NumPy loop | 172.1 | 236.2 | **1.4×** |
|
|
286
|
+
| detection: COCO evaluation (1000 images) | pycocotools | 1147.9 | 1351.0 | **1.2×** |
|
|
287
|
+
| multiple testing: Hochberg (n p-values) | statsmodels | 91.9 | 98.4 | **1.1×** |
|
|
288
|
+
| regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 32.0 | 22.6 | 0.71× |
|
|
289
|
+
| retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 248.6 | 897.0 | **3.6×** |
|
|
290
|
+
| segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 51.6 | 289.5 | **5.6×** |
|
|
291
|
+
| segmentation: Hausdorff distance (50 images) | SciPy | 31.9 | 23.8 | 0.75× |
|
|
292
|
+
| statistics: Cramér's V (5×5 table) | SciPy | 0.3 | 0.3 | 0.95× |
|
|
293
|
+
| statistics: Mann–Whitney U | SciPy | 390.3 | 425.8 | **1.1×** |
|
|
294
|
+
| statistics: Welch t-test | SciPy | 37.7 | 16.3 | 0.43× |
|
|
295
|
+
| structured: JSON Schema compliance (10000 documents) | jsonschema | 159.4 | 371.7 | **2.3×** |
|
|
296
|
+
| systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 740.3 | 791.9 | **1.1×** |
|
|
297
|
+
| systems: confidence AUROC (n answers) | scikit-learn | 194.4 | 327.7 | **1.7×** |
|
|
298
|
+
| systems: distribution-shift drop, Welch CI (n scores) | SciPy | 13.3 | 16.9 | **1.3×** |
|
|
299
|
+
| systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 145.0 | 333.2 | **2.3×** |
|
|
300
|
+
| systems: latency p50 / p95 / p99 (n requests) | NumPy | 41.0 | 19.7 | 0.48× |
|
|
301
|
+
| systems: maintainability index (1000 programs) | radon | 138.3 | 168.7 | **1.2×** |
|
|
302
|
+
| text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 2726.2 | 3121.0 | **1.1×** |
|
|
303
|
+
| text: METEOR, exact and stem matches (10000 sentences) | NLTK | 507.4 | 590.3 | **1.2×** |
|
|
304
|
+
| text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 1147.3 | 1010.7 | 0.88× |
|
|
305
|
+
|
|
306
|
+
**Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`): all 225 registered metrics and
|
|
307
|
+
statistics functions at 10,000 and 100,000 samples. 86 are compared with a reference library, 118 with an
|
|
308
|
+
independent textbook formula and 21 (learned, judge-dependent or randomised) are timed alone; **all 204
|
|
309
|
+
comparisons agree**, and against the libraries the geometric-mean speed-up is **2.67×** (139 of 172
|
|
278
310
|
measurements faster). Per-metric table in BENCHMARKS.md.
|
|
279
311
|
|
|
280
312
|
`evaluate()` validates inputs once and builds the confusion matrix once for all metrics, which is where most
|
|
@@ -315,6 +347,29 @@ object size, AP per class with COCO or VOC interpolation, precision-recall curve
|
|
|
315
347
|
MSLE, RMSLE, median absolute error, explained variance, max error, mean bias error, quantile (pinball)
|
|
316
348
|
loss, Huber loss, relative absolute error, relative squared error.
|
|
317
349
|
|
|
350
|
+
**LLM evaluation** (0.4.0): BLEU, sentence BLEU, chrF/chrF++, TER, ROUGE-1/2/L/Lsum, METEOR, CIDEr-D, SPICE,
|
|
351
|
+
perplexity, cross-entropy, Distinct-n, Self-BLEU, MAUVE, BERTScore, embedding similarity, MoverScore, learned
|
|
352
|
+
metrics via `model_score`; faithfulness, hallucination rate, groundedness, citation precision/recall, claim
|
|
353
|
+
verification, knowledge consistency, answer correctness/relevance, abstention, exact match, token F1; win
|
|
354
|
+
rate, Bradley–Terry, Elo, Krippendorff's alpha, Fleiss' kappa, judge agreement and biases, rubric scores;
|
|
355
|
+
pass@k, majority vote, benchmark accuracy; Precision/Recall/Hit rate@k, MRR, MAP, NDCG, context precision,
|
|
356
|
+
recall and relevance; JSON / JSON Schema / XML validity, required fields, tool calls, instruction following.
|
|
357
|
+
|
|
358
|
+
**LLM systems** (0.5.0): harmful-response, refusal, over-refusal, attack-success and red-team success rates,
|
|
359
|
+
expected maximum toxicity, CrowS-Pairs stereotype preference, WEAT, PII leakage, memorization exposure,
|
|
360
|
+
policy violations; adversarial, typo-noise, OOD and code-switching robustness, distribution-shift drop,
|
|
361
|
+
paraphrase / counterfactual / cross-lingual consistency, response stability, contradiction rate, failure and
|
|
362
|
+
recovery rates, prompt sensitivity, truncation sensitivity; adaptive calibration error, risk-coverage curve,
|
|
363
|
+
AURC and E-AURC, selective risk, risk at coverage, coverage at risk, confidence AUROC; task completion,
|
|
364
|
+
invalid tool calls, tool-use efficiency, steps per task, plan adherence, state tracking, tool-failure
|
|
365
|
+
recovery, loop rate, human intervention, cost per task; language ID, bitext mining, language parity, direct
|
|
366
|
+
assessment, cultural appropriateness, language consistency; unit-test pass rate, syntax validity, static
|
|
367
|
+
analysis and security findings, execution success, test coverage, patch acceptance, SWE-bench resolved rate,
|
|
368
|
+
CodeBLEU, cyclomatic complexity and maintainability index, runtime efficiency; long-context accuracy by
|
|
369
|
+
length, needle-in-a-haystack grid, position accuracy, lost-in-the-middle gap, context utilization, summary
|
|
370
|
+
coverage, compression ratio, citation coverage, cross-document consistency; TTFT, TPOT, latency percentiles,
|
|
371
|
+
throughput, token usage, cost, resource utilization, energy per request, requests per second, availability.
|
|
372
|
+
|
|
318
373
|
## Conventions
|
|
319
374
|
|
|
320
375
|
- `average="auto"` resolves to `"binary"` for binary targets and `"macro"` otherwise; the resolved value
|
|
@@ -56,6 +56,7 @@ dev = [
|
|
|
56
56
|
"jsonschema>=4.18",
|
|
57
57
|
"choix>=0.3",
|
|
58
58
|
"krippendorff>=0.6",
|
|
59
|
+
"radon>=6",
|
|
59
60
|
"pot>=0.9; python_version < '3.14'",
|
|
60
61
|
"ranx>=0.3.19; python_version < '3.14'",
|
|
61
62
|
"ruff>=0.6",
|
|
@@ -111,7 +112,7 @@ ignore_missing_imports = true
|
|
|
111
112
|
|
|
112
113
|
[[tool.mypy.overrides]]
|
|
113
114
|
# optional reference libraries used only by the benchmarks and METEOR's default stemmer
|
|
114
|
-
module = ["sacrebleu.*", "rouge_score.*", "nltk.*", "ranx.*", "krippendorff.*", "jsonschema.*", "pycocotools.*"]
|
|
115
|
+
module = ["sacrebleu.*", "rouge_score.*", "nltk.*", "ranx.*", "krippendorff.*", "jsonschema.*", "pycocotools.*", "codebleu.*", "radon.*", "pycocoevalcap.*", "ot.*", "choix.*"]
|
|
115
116
|
ignore_missing_imports = true
|
|
116
117
|
follow_untyped_imports = false
|
|
117
118
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
>>> print(result.summary()) # doctest: +SKIP
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from . import calibration, classification, clinical, plot, regression, stats, text, vision
|
|
8
|
+
from . import calibration, classification, clinical, llmsys, plot, regression, stats, text, vision
|
|
9
9
|
from .api import evaluate
|
|
10
10
|
from .calibration import (
|
|
11
11
|
CalibrationReport,
|
|
@@ -63,6 +63,8 @@ from .core.exceptions import (
|
|
|
63
63
|
)
|
|
64
64
|
from .core.registry import MetricInfo, list_metrics, metric_info
|
|
65
65
|
from .core.result import EvaluationResult, MetricResult
|
|
66
|
+
from .llmsys import * # noqa: F403 (v0.5.0 LLM-systems functions, listed in llmsys.__all__)
|
|
67
|
+
from .llmsys import __all__ as _llmsys_all
|
|
66
68
|
from .regression import (
|
|
67
69
|
adjusted_r2,
|
|
68
70
|
explained_variance,
|
|
@@ -137,6 +139,7 @@ from .vision import (
|
|
|
137
139
|
|
|
138
140
|
__all__ = [
|
|
139
141
|
"text",
|
|
142
|
+
"llmsys",
|
|
140
143
|
"SegmentationReport",
|
|
141
144
|
"segmentation_report",
|
|
142
145
|
"detection_pr_curve",
|
|
@@ -262,3 +265,4 @@ __all__ = [
|
|
|
262
265
|
"top_k_accuracy",
|
|
263
266
|
]
|
|
264
267
|
__all__ += list(_text_all)
|
|
268
|
+
__all__ += list(_llmsys_all)
|