evalsuite-python 0.5.5__tar.gz → 0.6.0__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.
Files changed (129) hide show
  1. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/CHANGELOG.md +31 -0
  2. evalsuite_python-0.6.0/CONTRIBUTING.md +51 -0
  3. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/PKG-INFO +106 -85
  4. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/README.md +53 -34
  5. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/pyproject.toml +24 -3
  6. evalsuite_python-0.6.0/rust/Cargo.lock +137 -0
  7. evalsuite_python-0.6.0/rust/Cargo.toml +18 -0
  8. evalsuite_python-0.6.0/rust/evalsuite-core/Cargo.toml +14 -0
  9. evalsuite_python-0.6.0/rust/evalsuite-core/README.md +10 -0
  10. evalsuite_python-0.6.0/rust/evalsuite-core/src/coco.rs +66 -0
  11. evalsuite_python-0.6.0/rust/evalsuite-core/src/hash.rs +70 -0
  12. evalsuite_python-0.6.0/rust/evalsuite-core/src/lib.rs +13 -0
  13. evalsuite_python-0.6.0/rust/evalsuite-core/src/meteor.rs +72 -0
  14. evalsuite_python-0.6.0/rust/evalsuite-core/src/resample.rs +40 -0
  15. evalsuite_python-0.6.0/rust/evalsuite-core/src/ter.rs +304 -0
  16. evalsuite_python-0.6.0/rust/evalsuite-core/src/text.rs +273 -0
  17. evalsuite_python-0.6.0/rust/evalsuite-py/Cargo.toml +18 -0
  18. evalsuite_python-0.6.0/rust/evalsuite-py/src/lib.rs +328 -0
  19. evalsuite_python-0.6.0/src/evalsuite/_native.py +60 -0
  20. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/_resolve.py +92 -1
  21. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/intervals.py +12 -3
  22. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/generation.py +170 -33
  23. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/version.py +1 -1
  24. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/vision/detection.py +23 -0
  25. evalsuite_python-0.6.0/tests/test_native.py +265 -0
  26. evalsuite_python-0.5.5/.gitignore +0 -19
  27. evalsuite_python-0.5.5/CONTRIBUTING.md +0 -26
  28. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/LICENSE +0 -0
  29. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/LICENSE-APACHE +0 -0
  30. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/__init__.py +0 -0
  31. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/__main__.py +0 -0
  32. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/_bench_metrics.py +0 -0
  33. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/_lazy.py +0 -0
  34. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/api.py +0 -0
  35. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/benchmarks.py +0 -0
  36. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/calibration.py +0 -0
  37. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/classification/__init__.py +0 -0
  38. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/classification/_common.py +0 -0
  39. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/classification/metrics.py +0 -0
  40. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/cli/__init__.py +0 -0
  41. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/cli/main.py +0 -0
  42. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/clinical/__init__.py +0 -0
  43. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/clinical/metrics.py +0 -0
  44. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/clinical/report.py +0 -0
  45. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/__init__.py +0 -0
  46. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/context.py +0 -0
  47. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/exceptions.py +0 -0
  48. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/export.py +0 -0
  49. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/registry.py +0 -0
  50. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/result.py +0 -0
  51. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/types.py +0 -0
  52. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/core/validation.py +0 -0
  53. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/__init__.py +0 -0
  54. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/_common.py +0 -0
  55. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/agents.py +0 -0
  56. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/code.py +0 -0
  57. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/efficiency.py +0 -0
  58. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/longcontext.py +0 -0
  59. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/multilingual.py +0 -0
  60. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/robustness.py +0 -0
  61. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/safety.py +0 -0
  62. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/llmsys/uncertainty.py +0 -0
  63. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/plot.py +0 -0
  64. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/py.typed +0 -0
  65. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/regression/__init__.py +0 -0
  66. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/regression/metrics.py +0 -0
  67. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/reporting.py +0 -0
  68. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/__init__.py +0 -0
  69. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/compare.py +0 -0
  70. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/effect.py +0 -0
  71. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/hypothesis.py +0 -0
  72. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/paired.py +0 -0
  73. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/stats/results.py +0 -0
  74. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/__init__.py +0 -0
  75. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/_common.py +0 -0
  76. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/factuality.py +0 -0
  77. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/judge.py +0 -0
  78. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/qa.py +0 -0
  79. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/rag.py +0 -0
  80. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/reasoning.py +0 -0
  81. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/report.py +0 -0
  82. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/retrieval.py +0 -0
  83. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/semantic.py +0 -0
  84. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/spice.py +0 -0
  85. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/text/structured.py +0 -0
  86. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/vision/__init__.py +0 -0
  87. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/src/evalsuite/vision/segmentation.py +0 -0
  88. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/__init__.py +0 -0
  89. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/classification/__init__.py +0 -0
  90. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/classification/test_against_sklearn.py +0 -0
  91. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/clinical/__init__.py +0 -0
  92. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/clinical/test_outputs.py +0 -0
  93. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/clinical/test_v020.py +0 -0
  94. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/conftest.py +0 -0
  95. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/integration/__init__.py +0 -0
  96. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/integration/test_qa.py +0 -0
  97. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/integration/test_readme_examples.py +0 -0
  98. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/integration/test_repo_hygiene.py +0 -0
  99. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/__init__.py +0 -0
  100. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/test_code_longcontext_efficiency.py +0 -0
  101. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/test_edges.py +0 -0
  102. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/test_fast_text.py +0 -0
  103. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/test_hardening.py +0 -0
  104. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/test_safety_robustness.py +0 -0
  105. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/llmsys/test_uncertainty_agents_multilingual.py +0 -0
  106. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/output/__init__.py +0 -0
  107. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/output/test_benchmarks.py +0 -0
  108. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/output/test_cli.py +0 -0
  109. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/output/test_plot.py +0 -0
  110. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/output/test_reporting.py +0 -0
  111. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/regression/__init__.py +0 -0
  112. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/regression/test_against_sklearn.py +0 -0
  113. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/stats/__init__.py +0 -0
  114. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/stats/test_branches.py +0 -0
  115. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/stats/test_compare.py +0 -0
  116. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/stats/test_fast_paths.py +0 -0
  117. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/stats/test_reference.py +0 -0
  118. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/text/__init__.py +0 -0
  119. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/text/test_against_references.py +0 -0
  120. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/text/test_text_edges.py +0 -0
  121. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/text/test_v040.py +0 -0
  122. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/unit/__init__.py +0 -0
  123. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/unit/test_core.py +0 -0
  124. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/unit/test_edges.py +0 -0
  125. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/vision/__init__.py +0 -0
  126. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/vision/test_detection.py +0 -0
  127. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/vision/test_edges.py +0 -0
  128. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/vision/test_outputs.py +0 -0
  129. {evalsuite_python-0.5.5 → evalsuite_python-0.6.0}/tests/vision/test_segmentation.py +0 -0
@@ -6,6 +6,37 @@ All notable changes to this project are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.0] - 2026-11-24
10
+
11
+ EvalSuite now has a **compiled core written in Rust**. The public API is unchanged and every result is identical:
12
+ each kernel is a direct port of the Python implementation it replaces, which stays as the reference and as the
13
+ fallback, and the two are tested against each other for every kernel.
14
+
15
+ ### Added
16
+ - `evalsuite._core`, built from `rust/` (crates `evalsuite-core`, pure Rust, and `evalsuite-py`, the PyO3
17
+ bindings) with maturin. Binary wheels for Linux (x86_64, aarch64; glibc and musl), macOS (arm64, x86_64) and
18
+ Windows (x64, arm64), each built for the stable ABI so one wheel serves Python 3.9 to 3.14.
19
+ - A pure-Python wheel (`py3-none-any`): pip installs it only where no binary wheel fits, and EvalSuite then runs
20
+ its Python implementations with the same results. `EVALSUITE_PURE_PYTHON=1` selects them on any install;
21
+ `evalsuite._native.backend()` reports `"rust"` or `"python"`.
22
+ - Compiled kernels: TER (beam edit distance with block shifts), BLEU / self-BLEU / sentence-BLEU statistics,
23
+ chrF and chrF++ statistics, ROUGE-N overlaps, ROUGE-L and ROUGE-Lsum longest common subsequences, METEOR
24
+ alignment, COCO detection matching, and bootstrap resample counting.
25
+ - Bootstrap intervals, paired bootstrap tests and `compare()` evaluate confusion-matrix metrics (accuracy,
26
+ balanced accuracy, Cohen's kappa, F1, F-beta, Jaccard, MCC, NPV, precision, recall, specificity) from counts
27
+ of each resample's (true, predicted) pairs instead of the resampled observations, and the BCa jackknife from
28
+ the full counts minus each block's: identical values, no per-resample copies of the data.
29
+ - `tests/test_native.py`: parity of every kernel with its Python reference; CI runs the whole suite with and
30
+ without the core and requires the binary wheel, the pure wheel and the sdist to give identical results.
31
+
32
+ ### Changed
33
+ - Benchmarks: overall geometric-mean speed-up 3.29× → **3.70×** (81 of 81 rows faster), per-metric speed-up
34
+ against reference libraries 4.97× → **5.99×** (172 of 172 faster); every comparison still agrees.
35
+ - Against 0.5.5: TER about 12× faster (now about 19× sacreBLEU), self-BLEU 10×, chrF 7×, BLEU and ROUGE 2–5×,
36
+ METEOR 2×, bootstrap confidence intervals about 5×, paired bootstrap tests and `compare()` about 2×.
37
+ Corpus BLEU and chrF together are now 8.3× sacreBLEU, METEOR 4.9× NLTK and COCO evaluation 2.3× pycocotools.
38
+ - Build backend: maturin (was hatchling); building from the sdist needs a Rust toolchain.
39
+
9
40
  ## [0.5.5] - 2026-11-09
10
41
 
11
42
  Every benchmark row is now faster than its reference library: 81 of 81 in the main benchmark (geometric mean
@@ -0,0 +1,51 @@
1
+ # Contributing to EvalSuite
2
+
3
+ Thank you for helping. EvalSuite values correctness and clarity over breadth.
4
+
5
+ ## Development setup
6
+
7
+ EvalSuite has a compiled core written in Rust (`rust/`), built into `evalsuite._core` by
8
+ [maturin](https://www.maturin.rs). Install a Rust toolchain ([rustup](https://rustup.rs)), then:
9
+
10
+ ```bash
11
+ pip install -e ".[dev]" # builds the core; rerun after changing anything under rust/
12
+ python -c "from evalsuite import _native; print(_native.backend())" # rust
13
+ ```
14
+
15
+ Every function with a compiled kernel keeps its Python implementation as the reference and fallback. Set
16
+ `EVALSUITE_PURE_PYTHON=1` to run without the core; `tests/test_native.py` checks that both give identical
17
+ results, and must keep passing.
18
+
19
+ ## Adding or changing a compiled kernel
20
+
21
+ 1. Port the Python reference operation for operation (same counts, tie-breaks and floating-point order) into
22
+ `rust/evalsuite-core` (pure Rust, no Python), and expose it in `rust/evalsuite-py`.
23
+ 2. Keep the Python path and call the core from it only when `evalsuite._native.core` is available.
24
+ 3. Add a parity test to `tests/test_native.py` comparing both paths, then run the checks below.
25
+
26
+ ## Adding or changing a metric
27
+
28
+ 1. Implement it with `@register(...)`: definition, formula, range, input requirements and at least one
29
+ reference.
30
+ 2. Validate inputs through `evalsuite.core.validation`; raise `InputValidationError` for bad inputs and
31
+ `MetricInputError` for values outside the metric's domain, with a message saying how to fix it.
32
+ 3. Test it: against an established implementation where definitions coincide (scikit-learn, SciPy), plus
33
+ hand-computed cases, edge cases and, where useful, property-based tests.
34
+ 4. Document conventions explicitly (averaging, label order, zero division) and update `CHANGELOG.md`.
35
+
36
+ ## Checks
37
+
38
+ ```bash
39
+ pytest --cov=evalsuite # coverage must stay at or above 95% for core modules
40
+ EVALSUITE_PURE_PYTHON=1 pytest -q # the same suite without the compiled core
41
+ ruff check . && ruff format --check .
42
+ mypy # strict
43
+ cargo fmt --manifest-path rust/Cargo.toml --all --check
44
+ cargo clippy --manifest-path rust/Cargo.toml --all-targets -- -D warnings
45
+ cargo test --manifest-path rust/Cargo.toml -p evalsuite-core
46
+ ```
47
+
48
+ ## Reporting issues
49
+
50
+ Include the EvalSuite, Python and NumPy versions, a minimal example, the expected result (with a reference)
51
+ and the actual result.
@@ -1,22 +1,12 @@
1
- Metadata-Version: 2.5
1
+ Metadata-Version: 2.4
2
2
  Name: evalsuite-python
3
- Version: 0.5.5
4
- Summary: A unified Python framework for machine-learning, clinical, statistical, segmentation, object-detection, uncertainty, and model evaluation.
5
- Project-URL: Homepage, https://evalsuite-nine.vercel.app
6
- Project-URL: Documentation, https://evalsuite-nine.vercel.app/docs
7
- Project-URL: Source, https://github.com/mkcs28/evalsuite-python
8
- Project-URL: Issues, https://github.com/mkcs28/evalsuite-python/issues
9
- Project-URL: Changelog, https://github.com/mkcs28/evalsuite-python/blob/main/CHANGELOG.md
10
- Author: Manoj Kumar C S, Nikhil D Bharadwaj
11
- Maintainer: Manoj Kumar C S, Nikhil D Bharadwaj
12
- License-Expression: MIT OR Apache-2.0
13
- License-File: LICENSE
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
3
+ Version: 0.6.0
16
4
  Classifier: Development Status :: 5 - Production/Stable
17
- Classifier: Intended Audience :: Developers
18
- Classifier: Intended Audience :: Healthcare Industry
19
5
  Classifier: Intended Audience :: Science/Research
6
+ Classifier: Intended Audience :: Healthcare Industry
7
+ Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
8
+ Classifier: Topic :: Scientific/Engineering :: Image Recognition
9
+ Classifier: Intended Audience :: Developers
20
10
  Classifier: Operating System :: OS Independent
21
11
  Classifier: Programming Language :: Python :: 3
22
12
  Classifier: Programming Language :: Python :: 3 :: Only
@@ -26,51 +16,62 @@ Classifier: Programming Language :: Python :: 3.11
26
16
  Classifier: Programming Language :: Python :: 3.12
27
17
  Classifier: Programming Language :: Python :: 3.13
28
18
  Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Rust
29
20
  Classifier: Topic :: Scientific/Engineering
30
21
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
31
- Classifier: Topic :: Scientific/Engineering :: Image Recognition
32
- Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
33
22
  Classifier: Typing :: Typed
34
- Requires-Python: >=3.9
35
23
  Requires-Dist: numpy>=1.22
36
- Requires-Dist: pandas>=1.4
37
24
  Requires-Dist: scipy>=1.8
25
+ Requires-Dist: pandas>=1.4
26
+ Requires-Dist: matplotlib>=3.5 ; extra == 'all'
27
+ Requires-Dist: pillow>=9 ; extra == 'all'
28
+ Requires-Dist: nltk>=3.8 ; extra == 'all'
29
+ Requires-Dist: pytest>=7 ; extra == 'dev'
30
+ Requires-Dist: pytest-cov>=4 ; extra == 'dev'
31
+ Requires-Dist: hypothesis>=6.80 ; extra == 'dev'
32
+ Requires-Dist: scikit-learn>=1.4 ; extra == 'dev'
33
+ Requires-Dist: statsmodels>=0.13 ; extra == 'dev'
34
+ Requires-Dist: matplotlib>=3.5 ; extra == 'dev'
35
+ Requires-Dist: pillow>=9 ; extra == 'dev'
36
+ Requires-Dist: pycocotools>=2.0.7 ; extra == 'dev'
37
+ Requires-Dist: nltk>=3.8 ; extra == 'dev'
38
+ Requires-Dist: sacrebleu>=2.4 ; extra == 'dev'
39
+ Requires-Dist: rouge-score>=0.1.2 ; extra == 'dev'
40
+ Requires-Dist: pycocoevalcap>=1.2 ; extra == 'dev'
41
+ Requires-Dist: jsonschema>=4.18 ; extra == 'dev'
42
+ Requires-Dist: choix>=0.3 ; extra == 'dev'
43
+ Requires-Dist: krippendorff>=0.6 ; extra == 'dev'
44
+ Requires-Dist: radon>=6 ; extra == 'dev'
45
+ Requires-Dist: pot>=0.9 ; python_full_version < '3.14' and extra == 'dev'
46
+ Requires-Dist: ranx>=0.3.19 ; python_full_version < '3.14' and extra == 'dev'
47
+ Requires-Dist: ruff>=0.6 ; extra == 'dev'
48
+ Requires-Dist: mypy>=1.10 ; extra == 'dev'
49
+ Requires-Dist: pandas-stubs ; extra == 'dev'
50
+ Requires-Dist: build ; extra == 'dev'
51
+ Requires-Dist: twine ; extra == 'dev'
52
+ Requires-Dist: pip-audit ; extra == 'dev'
53
+ Requires-Dist: nltk>=3.8 ; extra == 'llm'
54
+ Requires-Dist: matplotlib>=3.5 ; extra == 'plot'
55
+ Requires-Dist: pillow>=9 ; extra == 'vision'
38
56
  Provides-Extra: all
39
- Requires-Dist: matplotlib>=3.5; extra == 'all'
40
- Requires-Dist: nltk>=3.8; extra == 'all'
41
- Requires-Dist: pillow>=9; extra == 'all'
42
57
  Provides-Extra: dev
43
- Requires-Dist: build; extra == 'dev'
44
- Requires-Dist: choix>=0.3; extra == 'dev'
45
- Requires-Dist: hypothesis>=6.80; extra == 'dev'
46
- Requires-Dist: jsonschema>=4.18; extra == 'dev'
47
- Requires-Dist: krippendorff>=0.6; extra == 'dev'
48
- Requires-Dist: matplotlib>=3.5; extra == 'dev'
49
- Requires-Dist: mypy>=1.10; extra == 'dev'
50
- Requires-Dist: nltk>=3.8; extra == 'dev'
51
- Requires-Dist: pandas-stubs; extra == 'dev'
52
- Requires-Dist: pillow>=9; extra == 'dev'
53
- Requires-Dist: pip-audit; extra == 'dev'
54
- Requires-Dist: pot>=0.9; (python_version < '3.14') and extra == 'dev'
55
- Requires-Dist: pycocoevalcap>=1.2; extra == 'dev'
56
- Requires-Dist: pycocotools>=2.0.7; extra == 'dev'
57
- Requires-Dist: pytest-cov>=4; extra == 'dev'
58
- Requires-Dist: pytest>=7; extra == 'dev'
59
- Requires-Dist: radon>=6; extra == 'dev'
60
- Requires-Dist: ranx>=0.3.19; (python_version < '3.14') and extra == 'dev'
61
- Requires-Dist: rouge-score>=0.1.2; extra == 'dev'
62
- Requires-Dist: ruff>=0.6; extra == 'dev'
63
- Requires-Dist: sacrebleu>=2.4; extra == 'dev'
64
- Requires-Dist: scikit-learn>=1.4; extra == 'dev'
65
- Requires-Dist: statsmodels>=0.13; extra == 'dev'
66
- Requires-Dist: twine; extra == 'dev'
67
58
  Provides-Extra: llm
68
- Requires-Dist: nltk>=3.8; extra == 'llm'
69
59
  Provides-Extra: plot
70
- Requires-Dist: matplotlib>=3.5; extra == 'plot'
71
60
  Provides-Extra: vision
72
- Requires-Dist: pillow>=9; extra == 'vision'
73
- Description-Content-Type: text/markdown
61
+ License-File: LICENSE
62
+ License-File: LICENSE-APACHE
63
+ Summary: A unified Python framework for machine-learning, clinical, statistical, segmentation, object-detection, uncertainty, and model evaluation.
64
+ Keywords: evaluation,metrics,segmentation,object detection,mAP,clinical,diagnostic accuracy,calibration,statistical tests,machine learning,statistics,classification,regression,reproducibility,rust
65
+ Author: Manoj Kumar C S, Nikhil D Bharadwaj
66
+ Maintainer: Manoj Kumar C S, Nikhil D Bharadwaj
67
+ License-Expression: MIT OR Apache-2.0
68
+ Requires-Python: >=3.9
69
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
70
+ Project-URL: Changelog, https://github.com/mkcs28/evalsuite-python/blob/main/CHANGELOG.md
71
+ Project-URL: Documentation, https://evalsuite-nine.vercel.app/docs
72
+ Project-URL: Homepage, https://evalsuite-nine.vercel.app
73
+ Project-URL: Issues, https://github.com/mkcs28/evalsuite-python/issues
74
+ Project-URL: Source, https://github.com/mkcs28/evalsuite-python
74
75
 
75
76
  # EvalSuite
76
77
 
@@ -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.5.5).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
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.5.5, Python 3.13,
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.5e-14), 81 are faster, and the geometric-mean speed-up across all
346
- 27 cases and three sizes is **3.29×**. At 1,000,000 samples (pixels for
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 | 7.1 | 113.7 | **15.9×** |
353
- | agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.4 | 2.8 | **2.0×** |
354
- | binary: 8 label metrics via evaluate() | scikit-learn | 9.3 | 841.2 | **90.2×** |
355
- | binary: ROC AUC | scikit-learn | 171.4 | 294.0 | **1.7×** |
356
- | calibration: slope and intercept | statsmodels | 227.7 | 1188.2 | **5.2×** |
357
- | clinical: diagnostic report (7 CIs) | statsmodels | 5.0 | 5.4 | **1.1×** |
358
- | clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 19.5 | 352.0 | **18.1×** |
359
- | decision curve: 99 thresholds | NumPy loop | 149.2 | 200.9 | **1.3×** |
360
- | detection: COCO evaluation (1000 images) | pycocotools | 369.0 | 683.1 | **1.9×** |
361
- | multiple testing: Hochberg (n p-values) | statsmodels | 78.8 | 84.9 | **1.1×** |
362
- | regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 9.4 | 13.5 | **1.4×** |
363
- | retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 120.5 | 589.9 | **4.9×** |
364
- | segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 30.9 | 224.5 | **7.3×** |
365
- | segmentation: Hausdorff distance (50 images) | SciPy | 7.1 | 13.3 | **1.9×** |
366
- | statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **11.1×** |
367
- | statistics: Mann–Whitney U | SciPy | 148.0 | 317.1 | **2.1×** |
368
- | statistics: Welch t-test | SciPy | 7.1 | 9.7 | **1.4×** |
369
- | structured: JSON Schema compliance (10000 documents) | jsonschema | 98.0 | 223.3 | **2.3×** |
370
- | systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 431.3 | 523.0 | **1.2×** |
371
- | systems: confidence AUROC (n answers) | scikit-learn | 160.5 | 273.0 | **1.7×** |
372
- | systems: distribution-shift drop, Welch CI (n scores) | SciPy | 6.7 | 7.2 | **1.1×** |
373
- | systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 105.0 | 225.6 | **2.1×** |
374
- | systems: latency p50 / p95 / p99 (n requests) | NumPy | 10.8 | 12.2 | **1.1×** |
375
- | systems: maintainability index (1000 programs) | radon | 90.3 | 99.3 | **1.1×** |
376
- | text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 1435.8 | 2056.4 | **1.4×** |
377
- | text: METEOR, exact and stem matches (10000 sentences) | NLTK | 124.7 | 384.4 | **3.1×** |
378
- | text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 354.7 | 618.6 | **1.7×** |
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 **4.97×** (172 of 172
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.** `evaluate()` validates inputs once and builds the confusion
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/
@@ -486,3 +506,4 @@ Dual-licensed under either of
486
506
 
487
507
  at your option. Unless you explicitly state otherwise, any contribution you submit for inclusion in this
488
508
  project shall be dual-licensed as above, without any additional terms or conditions.
509
+
@@ -10,7 +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.5.5).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
13
+ > **Status: stable (0.6.0).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
14
+ > **0.6.0 adds a compiled Rust core**: same API and identical results, with text metrics, COCO matching and
15
+ > bootstrap resampling several times faster (prebuilt wheels for Linux, macOS and Windows).
14
16
  > **LLM systems arrive in 0.5.0**: safety, robustness, calibration and uncertainty, agents and tool use,
15
17
  > multilingual, code generation, long context and summarization, and inference efficiency and cost.
16
18
 
@@ -26,6 +28,12 @@ The package is installed as `evalsuite-python` and imported as `evalsuite`:
26
28
  import evalsuite as es
27
29
  ```
28
30
 
31
+ EvalSuite has a **compiled core written in Rust**. pip installs a prebuilt wheel on Linux (x86_64, aarch64;
32
+ glibc and musl), macOS (Apple silicon, Intel) and Windows (x64, arm64) for Python 3.9 to 3.14, so no compiler
33
+ is needed. Anywhere else pip falls back to a pure-Python wheel that gives exactly the same results, more slowly.
34
+ `evalsuite._native.backend()` says which one is in use (`"rust"` or `"python"`), and
35
+ `EVALSUITE_PURE_PYTHON=1` selects the Python implementations on any install.
36
+
29
37
  ## Why EvalSuite
30
38
 
31
39
  - **One consistent API.** Every metric returns a result object that behaves like a number and exports to
@@ -266,50 +274,53 @@ Input files can be CSV, TSV, Parquet or JSON. Output format follows `--format` o
266
274
 
267
275
  ## Performance
268
276
 
269
- Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.5.5, Python 3.13,
277
+ Benchmarked against reference implementations on the same data (fastest of 5 runs; EvalSuite 0.6.0, Python 3.13,
270
278
  NumPy 2.5, Linux x86_64). **Overall: 81 of 81 rows agree with the reference** (largest
271
- difference 2.5e-14), 81 are faster, and the geometric-mean speed-up across all
272
- 27 cases and three sizes is **3.29×**. At 1,000,000 samples (pixels for
279
+ difference 2.8e-14), 81 are faster, and the geometric-mean speed-up across all
280
+ 27 cases and three sizes is **3.70×**. At 1,000,000 samples (pixels for
273
281
  segmentation; 1,000 images for detection and 50 for Hausdorff; 10,000 examples for the LLM cases), in
274
282
  alphabetical order:
275
283
 
276
284
  | Case | Reference | EvalSuite (ms) | Reference (ms) | Speed-up |
277
285
  | --- | --- | ---: | ---: | ---: |
278
- | 10 classes: macro F1 | scikit-learn | 7.1 | 113.7 | **15.9×** |
279
- | agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.4 | 2.8 | **2.0×** |
280
- | binary: 8 label metrics via evaluate() | scikit-learn | 9.3 | 841.2 | **90.2×** |
281
- | binary: ROC AUC | scikit-learn | 171.4 | 294.0 | **1.7×** |
282
- | calibration: slope and intercept | statsmodels | 227.7 | 1188.2 | **5.2×** |
283
- | clinical: diagnostic report (7 CIs) | statsmodels | 5.0 | 5.4 | **1.1×** |
284
- | clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 19.5 | 352.0 | **18.1×** |
285
- | decision curve: 99 thresholds | NumPy loop | 149.2 | 200.9 | **1.3×** |
286
- | detection: COCO evaluation (1000 images) | pycocotools | 369.0 | 683.1 | **1.9×** |
287
- | multiple testing: Hochberg (n p-values) | statsmodels | 78.8 | 84.9 | **1.1×** |
288
- | regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 9.4 | 13.5 | **1.4×** |
289
- | retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 120.5 | 589.9 | **4.9×** |
290
- | segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 30.9 | 224.5 | **7.3×** |
291
- | segmentation: Hausdorff distance (50 images) | SciPy | 7.1 | 13.3 | **1.9×** |
292
- | statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **11.1×** |
293
- | statistics: Mann–Whitney U | SciPy | 148.0 | 317.1 | **2.1×** |
294
- | statistics: Welch t-test | SciPy | 7.1 | 9.7 | **1.4×** |
295
- | structured: JSON Schema compliance (10000 documents) | jsonschema | 98.0 | 223.3 | **2.3×** |
296
- | systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 431.3 | 523.0 | **1.2×** |
297
- | systems: confidence AUROC (n answers) | scikit-learn | 160.5 | 273.0 | **1.7×** |
298
- | systems: distribution-shift drop, Welch CI (n scores) | SciPy | 6.7 | 7.2 | **1.1×** |
299
- | systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 105.0 | 225.6 | **2.1×** |
300
- | systems: latency p50 / p95 / p99 (n requests) | NumPy | 10.8 | 12.2 | **1.1×** |
301
- | systems: maintainability index (1000 programs) | radon | 90.3 | 99.3 | **1.1×** |
302
- | text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 1435.8 | 2056.4 | **1.4×** |
303
- | text: METEOR, exact and stem matches (10000 sentences) | NLTK | 124.7 | 384.4 | **3.1×** |
304
- | text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 354.7 | 618.6 | **1.7×** |
286
+ | 10 classes: macro F1 | scikit-learn | 10.2 | 107.4 | **10.5×** |
287
+ | agreement: Krippendorff's alpha, interval (4 raters × 10000 items) | krippendorff | 1.3 | 2.9 | **2.3×** |
288
+ | binary: 8 label metrics via evaluate() | scikit-learn | 11.2 | 818.5 | **73.1×** |
289
+ | binary: ROC AUC | scikit-learn | 175.4 | 292.8 | **1.7×** |
290
+ | calibration: slope and intercept | statsmodels | 234.7 | 938.0 | **4.0×** |
291
+ | clinical: diagnostic report (7 CIs) | statsmodels | 4.3 | 4.4 | **1.0×** |
292
+ | clinical: sensitivity, specificity, LR+, LR− | scikit-learn | 18.8 | 309.7 | **16.5×** |
293
+ | decision curve: 99 thresholds | NumPy loop | 149.3 | 230.1 | **1.5×** |
294
+ | detection: COCO evaluation (1000 images) | pycocotools | 268.5 | 628.8 | **2.3×** |
295
+ | multiple testing: Hochberg (n p-values) | statsmodels | 69.4 | 81.2 | **1.2×** |
296
+ | regression: MAE, MSE, RMSE, R² via evaluate() | scikit-learn | 7.4 | 12.0 | **1.6×** |
297
+ | retrieval: MRR, MAP@20, NDCG@10 (10000 queries) | ranx | 121.7 | 546.7 | **4.5×** |
298
+ | segmentation: Dice and IoU per class (n = pixels) | scikit-learn | 34.2 | 200.8 | **5.9×** |
299
+ | segmentation: Hausdorff distance (50 images) | SciPy | 11.0 | 13.4 | **1.2×** |
300
+ | statistics: Cramér's V (5×5 table) | SciPy | 0.0 | 0.2 | **12.0×** |
301
+ | statistics: Mann–Whitney U | SciPy | 152.1 | 323.0 | **2.1×** |
302
+ | statistics: Welch t-test | SciPy | 7.7 | 11.6 | **1.5×** |
303
+ | structured: JSON Schema compliance (10000 documents) | jsonschema | 88.9 | 224.7 | **2.5×** |
304
+ | systems: CodeBLEU n-gram terms (1000 programs) | codebleu | 385.3 | 505.1 | **1.3×** |
305
+ | systems: confidence AUROC (n answers) | scikit-learn | 166.0 | 265.3 | **1.6×** |
306
+ | systems: distribution-shift drop, Welch CI (n scores) | SciPy | 10.8 | 12.1 | **1.1×** |
307
+ | systems: invalid tool calls vs JSON Schema (10000 tasks) | jsonschema | 79.1 | 209.2 | **2.6×** |
308
+ | systems: latency p50 / p95 / p99 (n requests) | NumPy | 13.7 | 15.4 | **1.1×** |
309
+ | systems: maintainability index (1000 programs) | radon | 84.5 | 93.4 | **1.1×** |
310
+ | text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 215.2 | 1962.8 | **9.1×** |
311
+ | text: METEOR, exact and stem matches (10000 sentences) | NLTK | 71.0 | 363.4 | **5.1×** |
312
+ | text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 154.6 | 608.3 | **3.9×** |
305
313
 
306
314
  **Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`): all 225 registered metrics and
307
315
  statistics functions at 10,000 and 100,000 samples. 86 are compared with a reference library, 118 with an
308
316
  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 **4.97×** (172 of 172
317
+ comparisons agree**, and against the libraries the geometric-mean speed-up is **5.99×** (172 of 172
310
318
  measurements faster). Per-metric table in BENCHMARKS.md.
311
319
 
312
- **Every row is faster than its reference.** `evaluate()` validates inputs once and builds the confusion
320
+ **Every row is faster than its reference.** The text metrics (BLEU, chrF, TER, ROUGE, METEOR), COCO
321
+ matching and bootstrap resampling run in the compiled Rust core; bootstrap intervals, paired bootstrap tests and
322
+ `compare()` evaluate confusion-matrix metrics from counts of each resample's (true, predicted) pairs instead of
323
+ copies of the data. `evaluate()` validates inputs once and builds the confusion
313
324
  matrix once for all metrics, and integer labels are encoded without sorting. The rank tests rank the data once
314
325
  with a single unstable sort; t-tests, χ², Fisher and McNemar compute their statistics directly, and
315
326
  Shapiro–Wilk caches its weights per sample size. Percentiles select exactly from a small bracketed window
@@ -386,13 +397,21 @@ throughput, token usage, cost, resource utilization, energy per request, request
386
397
 
387
398
  ## Development
388
399
 
400
+ Building from source needs a Rust toolchain ([rustup](https://rustup.rs)); the compiled core is in `rust/`
401
+ (`evalsuite-core`, pure Rust, and `evalsuite-py`, the PyO3 bindings), built by maturin.
402
+
389
403
  ```bash
390
404
  python -m venv .venv && source .venv/bin/activate
391
- pip install -e ".[dev]"
405
+ pip install -e ".[dev]" # builds the Rust core into evalsuite._core
392
406
  pytest --cov=evalsuite
407
+ EVALSUITE_PURE_PYTHON=1 pytest -q # the same suite without the compiled core
393
408
  ruff check . && ruff format --check . && mypy
409
+ cargo test --manifest-path rust/Cargo.toml -p evalsuite-core
394
410
  ```
395
411
 
412
+ Every compiled kernel is a port of a Python implementation that stays in the package as the reference and
413
+ fallback; `tests/test_native.py` checks that the two give identical results. See CONTRIBUTING.md.
414
+
396
415
  ## Links
397
416
 
398
417
  - PyPI: https://pypi.org/project/evalsuite-python/
@@ -1,6 +1,8 @@
1
1
  [build-system]
2
- requires = ["hatchling>=1.24"]
3
- build-backend = "hatchling.build"
2
+ # The compiled core (Rust, in rust/) is built by maturin into evalsuite._core. Hatchling builds the same package
3
+ # without it (scripts/build_pure_wheel.py): the pure-Python fallback wheel for platforms without a binary wheel.
4
+ requires = ["maturin>=1.9,<2"]
5
+ build-backend = "maturin"
4
6
 
5
7
  [project]
6
8
  name = "evalsuite-python"
@@ -12,7 +14,7 @@ license-files = ["LICENSE", "LICENSE-APACHE"]
12
14
  requires-python = ">=3.9"
13
15
  authors = [{ name = "Manoj Kumar C S" }, { name = "Nikhil D Bharadwaj" }]
14
16
  maintainers = [{ name = "Manoj Kumar C S" }, { name = "Nikhil D Bharadwaj" }]
15
- keywords = ["evaluation", "metrics", "segmentation", "object detection", "mAP", "clinical", "diagnostic accuracy", "calibration", "statistical tests", "machine learning", "statistics", "classification", "regression", "reproducibility"]
17
+ keywords = ["evaluation", "metrics", "segmentation", "object detection", "mAP", "clinical", "diagnostic accuracy", "calibration", "statistical tests", "machine learning", "statistics", "classification", "regression", "reproducibility", "rust"]
16
18
  classifiers = [
17
19
  "Development Status :: 5 - Production/Stable",
18
20
  "Intended Audience :: Science/Research",
@@ -29,6 +31,7 @@ classifiers = [
29
31
  "Programming Language :: Python :: 3.12",
30
32
  "Programming Language :: Python :: 3.13",
31
33
  "Programming Language :: Python :: 3.14",
34
+ "Programming Language :: Rust",
32
35
  "Topic :: Scientific/Engineering",
33
36
  "Topic :: Scientific/Engineering :: Artificial Intelligence",
34
37
  "Typing :: Typed",
@@ -82,6 +85,24 @@ path = "src/evalsuite/version.py"
82
85
 
83
86
  [tool.hatch.build.targets.wheel]
84
87
  packages = ["src/evalsuite"]
88
+ exclude = ["src/evalsuite/_core*.so", "src/evalsuite/_core*.pyd"]
89
+
90
+ [tool.maturin]
91
+ manifest-path = "rust/evalsuite-py/Cargo.toml"
92
+ python-source = "src"
93
+ module-name = "evalsuite._core"
94
+ profile = "release"
95
+ include = [
96
+ { path = "tests/**/*", format = "sdist" },
97
+ { path = "CHANGELOG.md", format = "sdist" },
98
+ { path = "CONTRIBUTING.md", format = "sdist" },
99
+ { path = "LICENSE-APACHE", format = "sdist" },
100
+ ]
101
+ exclude = [
102
+ { path = "**/__pycache__/**", format = "sdist" },
103
+ { path = "**/*.pyc", format = "sdist" },
104
+ { path = "rust/target/**", format = "sdist" },
105
+ ]
85
106
 
86
107
  [tool.hatch.build.targets.sdist]
87
108
  include = ["src/evalsuite", "tests", "README.md", "LICENSE", "CHANGELOG.md", "CONTRIBUTING.md", "pyproject.toml"]