evalsuite-python 0.8.5__tar.gz → 1.0.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 (143) hide show
  1. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/CHANGELOG.md +28 -0
  2. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/PKG-INFO +18 -2
  3. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/README.md +5 -1
  4. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/pyproject.toml +6 -0
  5. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/Cargo.lock +57 -4
  6. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/Cargo.toml +1 -1
  7. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/__init__.py +11 -0
  8. evalsuite_python-1.0.0/src/evalsuite/_evalci.py +251 -0
  9. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/api.py +37 -5
  10. evalsuite_python-1.0.0/src/evalsuite/cards.py +427 -0
  11. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/cli/main.py +49 -0
  12. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/result.py +84 -12
  13. evalsuite_python-1.0.0/src/evalsuite/harness.py +470 -0
  14. evalsuite_python-1.0.0/src/evalsuite/integrations.py +231 -0
  15. evalsuite_python-1.0.0/src/evalsuite/monitor.py +197 -0
  16. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/compare.py +2 -1
  17. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/version.py +1 -1
  18. evalsuite_python-1.0.0/tests/test_cards.py +85 -0
  19. evalsuite_python-1.0.0/tests/test_harness.py +117 -0
  20. evalsuite_python-1.0.0/tests/test_integrations.py +101 -0
  21. evalsuite_python-1.0.0/tests/test_monitor.py +57 -0
  22. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/unit/test_core.py +23 -1
  23. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/CONTRIBUTING.md +0 -0
  24. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/LICENSE +0 -0
  25. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/LICENSE-APACHE +0 -0
  26. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/Cargo.toml +0 -0
  27. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/README.md +0 -0
  28. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/agreement.rs +0 -0
  29. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/coco.rs +0 -0
  30. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/curve.rs +0 -0
  31. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/groups.rs +0 -0
  32. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/hash.rs +0 -0
  33. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/lib.rs +0 -0
  34. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/meteor.rs +0 -0
  35. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/permutation.rs +0 -0
  36. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/qa.rs +0 -0
  37. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/ranks.rs +0 -0
  38. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/resample.rs +0 -0
  39. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/surface.rs +0 -0
  40. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/ter.rs +0 -0
  41. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-core/src/text.rs +0 -0
  42. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-py/Cargo.toml +0 -0
  43. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/rust/evalsuite-py/src/lib.rs +0 -0
  44. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/__main__.py +0 -0
  45. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/_bench_metrics.py +0 -0
  46. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/_lazy.py +0 -0
  47. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/_native.py +0 -0
  48. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/benchmarks.py +0 -0
  49. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/calibration.py +0 -0
  50. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/classification/__init__.py +0 -0
  51. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/classification/_common.py +0 -0
  52. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/classification/metrics.py +0 -0
  53. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/cli/__init__.py +0 -0
  54. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/clinical/__init__.py +0 -0
  55. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/clinical/metrics.py +0 -0
  56. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/clinical/report.py +0 -0
  57. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/__init__.py +0 -0
  58. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/context.py +0 -0
  59. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/exceptions.py +0 -0
  60. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/export.py +0 -0
  61. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/registry.py +0 -0
  62. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/types.py +0 -0
  63. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/core/validation.py +0 -0
  64. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/__init__.py +0 -0
  65. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/_common.py +0 -0
  66. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/agents.py +0 -0
  67. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/code.py +0 -0
  68. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/efficiency.py +0 -0
  69. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/longcontext.py +0 -0
  70. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/multilingual.py +0 -0
  71. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/robustness.py +0 -0
  72. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/safety.py +0 -0
  73. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/llmsys/uncertainty.py +0 -0
  74. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/plot.py +0 -0
  75. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/py.typed +0 -0
  76. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/regression/__init__.py +0 -0
  77. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/regression/metrics.py +0 -0
  78. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/reporting.py +0 -0
  79. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/__init__.py +0 -0
  80. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/_resolve.py +0 -0
  81. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/effect.py +0 -0
  82. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/hypothesis.py +0 -0
  83. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/intervals.py +0 -0
  84. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/paired.py +0 -0
  85. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/stats/results.py +0 -0
  86. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/__init__.py +0 -0
  87. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/_common.py +0 -0
  88. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/factuality.py +0 -0
  89. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/generation.py +0 -0
  90. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/judge.py +0 -0
  91. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/qa.py +0 -0
  92. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/rag.py +0 -0
  93. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/reasoning.py +0 -0
  94. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/report.py +0 -0
  95. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/retrieval.py +0 -0
  96. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/semantic.py +0 -0
  97. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/spice.py +0 -0
  98. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/text/structured.py +0 -0
  99. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/vision/__init__.py +0 -0
  100. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/vision/detection.py +0 -0
  101. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/src/evalsuite/vision/segmentation.py +0 -0
  102. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/__init__.py +0 -0
  103. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/classification/__init__.py +0 -0
  104. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/classification/test_against_sklearn.py +0 -0
  105. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/clinical/__init__.py +0 -0
  106. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/clinical/test_outputs.py +0 -0
  107. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/clinical/test_v020.py +0 -0
  108. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/conftest.py +0 -0
  109. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/integration/__init__.py +0 -0
  110. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/integration/test_qa.py +0 -0
  111. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/integration/test_readme_examples.py +0 -0
  112. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/integration/test_repo_hygiene.py +0 -0
  113. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/__init__.py +0 -0
  114. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/test_code_longcontext_efficiency.py +0 -0
  115. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/test_edges.py +0 -0
  116. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/test_fast_text.py +0 -0
  117. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/test_hardening.py +0 -0
  118. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/test_safety_robustness.py +0 -0
  119. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/llmsys/test_uncertainty_agents_multilingual.py +0 -0
  120. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/output/__init__.py +0 -0
  121. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/output/test_benchmarks.py +0 -0
  122. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/output/test_cli.py +0 -0
  123. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/output/test_plot.py +0 -0
  124. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/output/test_reporting.py +0 -0
  125. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/regression/__init__.py +0 -0
  126. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/regression/test_against_sklearn.py +0 -0
  127. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/stats/__init__.py +0 -0
  128. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/stats/test_branches.py +0 -0
  129. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/stats/test_compare.py +0 -0
  130. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/stats/test_fast_paths.py +0 -0
  131. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/stats/test_reference.py +0 -0
  132. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/test_native.py +0 -0
  133. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/text/__init__.py +0 -0
  134. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/text/test_against_references.py +0 -0
  135. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/text/test_text_edges.py +0 -0
  136. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/text/test_v040.py +0 -0
  137. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/unit/__init__.py +0 -0
  138. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/unit/test_edges.py +0 -0
  139. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/vision/__init__.py +0 -0
  140. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/vision/test_detection.py +0 -0
  141. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/vision/test_edges.py +0 -0
  142. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/vision/test_outputs.py +0 -0
  143. {evalsuite_python-0.8.5 → evalsuite_python-1.0.0}/tests/vision/test_segmentation.py +0 -0
@@ -6,6 +6,34 @@ All notable changes to this project are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.0] - 2026-11-25
10
+
11
+ EvalSuite 1.0: answers with uncertainty by default, and one engine in every language.
12
+
13
+ ### Added
14
+ - **Confidence intervals by default in `evaluate()`** (`ci="analytic"`: Wilson for proportions, DeLong for
15
+ ROC AUC, t-intervals for error metrics; `ci="bootstrap"` or `ci=False`) and **baseline tests**
16
+ (`baseline_pred=` / `baseline_prob=`: paired difference with interval and p-value, Holm-adjusted). Summaries,
17
+ Markdown, LaTeX and DataFrame exports show the interval and the comparison.
18
+ - **LLM leaderboard harness** (`es.leaderboard`, `evalsuite leaderboard`): scorers (exact match, GSM8K, boxed,
19
+ choice, numeric, ...), Wilson / bootstrap intervals, McNemar or paired-bootstrap tests with Holm adjustment,
20
+ significance-aware ranks, per-category tables, extraction-failure, contamination (n-gram overlap) and
21
+ judge position-consistency checks; Markdown, LaTeX, HTML, CSV and JSON output.
22
+ - **Integrations** (`evalsuite.integrations`): scikit-learn scorers, Hugging Face `compute_metrics`, Keras and
23
+ PyTorch Lightning callbacks, MLflow and Weights & Biases logging (optional extras).
24
+ - **Monitoring** (`es.Monitor`, `evalsuite::monitor`): sliding-window metrics, PSI and Kolmogorov–Smirnov drift
25
+ against reference scores, threshold alerts with callbacks, `snapshot()` with intervals.
26
+ - **Report cards** (`es.report_card`): the TRIPOD+AI performance section (sample, discrimination, calibration,
27
+ Brier, threshold measures, net benefit, subgroups) with intervals, a results paragraph and the checklist; model
28
+ cards from `context`; Markdown, LaTeX, HTML, JSON, CSV and Word (`[docx]` extra).
29
+ - **One engine, every language**: `evalsuite::bridge` (JSON in, JSON out); the `evalsuite` npm package
30
+ (WebAssembly, Node and browser); a C API (`evalsuite-capi`, `evalsuite.h`); R (`bindings/r`) and Julia
31
+ (`bindings/julia`) packages. CI checks that every language gives the engine's value.
32
+
33
+ ### Changed
34
+ - Faster Rust text metrics: an allocation-free 13a tokenizer and parallel sentence statistics (TER 1.9×,
35
+ chrF 1.6×, BLEU 1.2× versus 0.8.5); HD95 percentiles by selection instead of sorting.
36
+
9
37
  ## [0.8.5] - 2026-11-25
10
38
 
11
39
  The Rust edition is complete, gains a command-line tool, and the Python retrieval metrics run on it.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evalsuite-python
3
- Version: 0.8.5
3
+ Version: 1.0.0
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Science/Research
6
6
  Classifier: Intended Audience :: Healthcare Industry
@@ -50,14 +50,26 @@ Requires-Dist: pandas-stubs ; extra == 'dev'
50
50
  Requires-Dist: build ; extra == 'dev'
51
51
  Requires-Dist: twine ; extra == 'dev'
52
52
  Requires-Dist: pip-audit ; extra == 'dev'
53
+ Requires-Dist: python-docx>=1.0 ; extra == 'docx'
54
+ Requires-Dist: keras>=3 ; extra == 'keras'
55
+ Requires-Dist: lightning>=2 ; extra == 'lightning'
53
56
  Requires-Dist: nltk>=3.8 ; extra == 'llm'
57
+ Requires-Dist: mlflow>=2 ; extra == 'mlflow'
54
58
  Requires-Dist: matplotlib>=3.5 ; extra == 'plot'
59
+ Requires-Dist: scikit-learn>=1.2 ; extra == 'sklearn'
55
60
  Requires-Dist: pillow>=9 ; extra == 'vision'
61
+ Requires-Dist: wandb>=0.16 ; extra == 'wandb'
56
62
  Provides-Extra: all
57
63
  Provides-Extra: dev
64
+ Provides-Extra: docx
65
+ Provides-Extra: keras
66
+ Provides-Extra: lightning
58
67
  Provides-Extra: llm
68
+ Provides-Extra: mlflow
59
69
  Provides-Extra: plot
70
+ Provides-Extra: sklearn
60
71
  Provides-Extra: vision
72
+ Provides-Extra: wandb
61
73
  License-File: LICENSE
62
74
  License-File: LICENSE-APACHE
63
75
  Summary: A unified Python framework for machine-learning, clinical, statistical, segmentation, object-detection, uncertainty, and model evaluation.
@@ -85,7 +97,11 @@ Project-URL: Source, https://github.com/mkcs28/evalsuite-python
85
97
  EvalSuite brings classification, regression, clinical, statistical, segmentation and object-detection
86
98
  evaluation into one consistent, validated, documented framework.
87
99
 
88
- > **Status: stable (0.8.5).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
100
+ > **Status: stable (1.0.0).** **1.0** makes `evaluate()` report confidence intervals by default and test
101
+ > against a baseline, and adds an LLM leaderboard harness, framework integrations (scikit-learn, Hugging Face,
102
+ > Keras, Lightning, MLflow, W&B), monitoring with drift alerts, TRIPOD+AI / model-card report cards, and the same
103
+ > engine for JavaScript (npm, WebAssembly), C, R and Julia.
104
+ > Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
89
105
  > **0.6 adds a compiled Rust core**: same API and identical results, with text metrics, COCO evaluation and
90
106
  > bootstrap resampling several times faster and multithreaded (prebuilt wheels for Linux, macOS and Windows).
91
107
  > **0.7.0** moves ROC AUC / average precision (and so `evaluate()`), the LLM-systems consistency metrics,
@@ -10,7 +10,11 @@
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.8.5).** Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
13
+ > **Status: stable (1.0.0).** **1.0** makes `evaluate()` report confidence intervals by default and test
14
+ > against a baseline, and adds an LLM leaderboard harness, framework integrations (scikit-learn, Hugging Face,
15
+ > Keras, Lightning, MLflow, W&B), monitoring with drift alerts, TRIPOD+AI / model-card report cards, and the same
16
+ > engine for JavaScript (npm, WebAssembly), C, R and Julia.
17
+ > Every item on the 0.1.0–0.5.0 roadmaps is implemented and verified, including SPICE.
14
18
  > **0.6 adds a compiled Rust core**: same API and identical results, with text metrics, COCO evaluation and
15
19
  > bootstrap resampling several times faster and multithreaded (prebuilt wheels for Linux, macOS and Windows).
16
20
  > **0.7.0** moves ROC AUC / average precision (and so `evaluate()`), the LLM-systems consistency metrics,
@@ -42,6 +42,12 @@ dependencies = ["numpy>=1.22", "scipy>=1.8", "pandas>=1.4"]
42
42
  plot = ["matplotlib>=3.5"]
43
43
  vision = ["pillow>=9"]
44
44
  llm = ["nltk>=3.8"]
45
+ sklearn = ["scikit-learn>=1.2"]
46
+ keras = ["keras>=3"]
47
+ lightning = ["lightning>=2"]
48
+ mlflow = ["mlflow>=2"]
49
+ docx = ["python-docx>=1.0"]
50
+ wandb = ["wandb>=0.16"]
45
51
  all = ["matplotlib>=3.5", "pillow>=9", "nltk>=3.8"]
46
52
  dev = [
47
53
  "pytest>=7",
@@ -319,7 +319,7 @@ checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
319
319
 
320
320
  [[package]]
321
321
  name = "evalsuite"
322
- version = "0.8.5"
322
+ version = "1.0.0"
323
323
  dependencies = [
324
324
  "criterion",
325
325
  "evalsuite-core",
@@ -332,9 +332,16 @@ dependencies = [
332
332
  "serde_json",
333
333
  ]
334
334
 
335
+ [[package]]
336
+ name = "evalsuite-capi"
337
+ version = "1.0.0"
338
+ dependencies = [
339
+ "evalsuite",
340
+ ]
341
+
335
342
  [[package]]
336
343
  name = "evalsuite-cli"
337
- version = "0.8.5"
344
+ version = "1.0.0"
338
345
  dependencies = [
339
346
  "clap",
340
347
  "csv",
@@ -344,20 +351,29 @@ dependencies = [
344
351
 
345
352
  [[package]]
346
353
  name = "evalsuite-core"
347
- version = "0.8.5"
354
+ version = "1.0.0"
348
355
  dependencies = [
349
356
  "rayon",
350
357
  ]
351
358
 
352
359
  [[package]]
353
360
  name = "evalsuite-py"
354
- version = "0.8.5"
361
+ version = "1.0.0"
355
362
  dependencies = [
356
363
  "evalsuite-core",
357
364
  "pyo3",
358
365
  "rayon",
359
366
  ]
360
367
 
368
+ [[package]]
369
+ name = "evalsuite-wasm"
370
+ version = "1.0.0"
371
+ dependencies = [
372
+ "evalsuite",
373
+ "js-sys",
374
+ "wasm-bindgen",
375
+ ]
376
+
361
377
  [[package]]
362
378
  name = "fancy-regex"
363
379
  version = "0.14.0"
@@ -375,6 +391,30 @@ version = "0.2.0"
375
391
  source = "registry+https://github.com/rust-lang/crates.io-index"
376
392
  checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
377
393
 
394
+ [[package]]
395
+ name = "futures-core"
396
+ version = "0.3.34"
397
+ source = "registry+https://github.com/rust-lang/crates.io-index"
398
+ checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
399
+
400
+ [[package]]
401
+ name = "futures-task"
402
+ version = "0.3.34"
403
+ source = "registry+https://github.com/rust-lang/crates.io-index"
404
+ checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
405
+
406
+ [[package]]
407
+ name = "futures-util"
408
+ version = "0.3.34"
409
+ source = "registry+https://github.com/rust-lang/crates.io-index"
410
+ checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
411
+ dependencies = [
412
+ "futures-core",
413
+ "futures-task",
414
+ "pin-project-lite",
415
+ "slab",
416
+ ]
417
+
378
418
  [[package]]
379
419
  name = "getopts"
380
420
  version = "0.2.24"
@@ -516,6 +556,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
516
556
  checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
517
557
  dependencies = [
518
558
  "cfg-if",
559
+ "futures-util",
519
560
  "wasm-bindgen",
520
561
  ]
521
562
 
@@ -687,6 +728,12 @@ dependencies = [
687
728
  "siphasher",
688
729
  ]
689
730
 
731
+ [[package]]
732
+ name = "pin-project-lite"
733
+ version = "0.2.18"
734
+ source = "registry+https://github.com/rust-lang/crates.io-index"
735
+ checksum = "c938015719552d665fd0553b90d96cd7ff58e83e4c061ca99e6bb78865a72752"
736
+
690
737
  [[package]]
691
738
  name = "portable-atomic"
692
739
  version = "1.15.0"
@@ -1003,6 +1050,12 @@ version = "1.0.4"
1003
1050
  source = "registry+https://github.com/rust-lang/crates.io-index"
1004
1051
  checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
1005
1052
 
1053
+ [[package]]
1054
+ name = "slab"
1055
+ version = "0.4.12"
1056
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1057
+ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
1058
+
1006
1059
  [[package]]
1007
1060
  name = "static_assertions"
1008
1061
  version = "1.1.0"
@@ -3,7 +3,7 @@ members = ["evalsuite-core", "evalsuite-py"]
3
3
  resolver = "2"
4
4
 
5
5
  [workspace.package]
6
- version = "0.8.5"
6
+ version = "1.0.0"
7
7
  edition = "2021"
8
8
  rust-version = "1.82"
9
9
  license = "MIT OR Apache-2.0"
@@ -15,6 +15,7 @@ from .calibration import (
15
15
  hosmer_lemeshow,
16
16
  maximum_calibration_error,
17
17
  )
18
+ from .cards import ReportCard, report_card
18
19
  from .classification import (
19
20
  accuracy,
20
21
  average_precision,
@@ -63,8 +64,10 @@ from .core.exceptions import (
63
64
  )
64
65
  from .core.registry import MetricInfo, list_metrics, metric_info
65
66
  from .core.result import EvaluationResult, MetricResult
67
+ from .harness import Leaderboard, leaderboard
66
68
  from .llmsys import * # noqa: F403 (v0.5.0 LLM-systems functions, listed in llmsys.__all__)
67
69
  from .llmsys import __all__ as _llmsys_all
70
+ from .monitor import Alert, Monitor, ks_drift, population_stability_index
68
71
  from .regression import (
69
72
  adjusted_r2,
70
73
  explained_variance,
@@ -196,6 +199,8 @@ __all__ = [
196
199
  "ClassificationReport",
197
200
  "stats",
198
201
  "roc_auc_ci",
202
+ "report_card",
203
+ "ReportCard",
199
204
  "proportion_ci",
200
205
  "paired_bootstrap_test",
201
206
  "mcnemar_test",
@@ -230,6 +235,12 @@ __all__ = [
230
235
  "cohen_kappa",
231
236
  "confusion_matrix",
232
237
  "evaluate",
238
+ "leaderboard",
239
+ "Monitor",
240
+ "Alert",
241
+ "population_stability_index",
242
+ "ks_drift",
243
+ "Leaderboard",
233
244
  "explained_variance",
234
245
  "f1",
235
246
  "fbeta",
@@ -0,0 +1,251 @@
1
+ """Confidence intervals and baseline comparisons for :func:`evalsuite.evaluate`.
2
+
3
+ ``ci="analytic"`` (the default) attaches closed-form intervals where a standard one exists and costs
4
+ nothing: Wilson intervals for proportions (accuracy, precision, recall, specificity, NPV), DeLong's interval
5
+ for binary ROC AUC, and Student-t intervals for metrics that are means of per-observation losses (Brier score,
6
+ log loss, MAE, MSE, mean bias error; RMSE from the MSE interval). ``ci="bootstrap"`` uses the paired percentile
7
+ bootstrap of :func:`evalsuite.compare` for every metric. A baseline (``baseline_pred`` / ``baseline_prob``)
8
+ adds paired tests against it: McNemar's test for accuracy, DeLong's test for binary ROC AUC and a paired
9
+ bootstrap test otherwise, with p-values adjusted within each metric (Holm).
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ import inspect
15
+ import math
16
+ from typing import Any, Optional
17
+
18
+ import numpy as np
19
+
20
+ from .core.exceptions import InputValidationError
21
+ from .core.result import EvaluationResult, MetricResult
22
+
23
+ _PROPORTIONS = {"precision", "recall", "specificity", "npv", "sensitivity", "ppv"}
24
+ _MEAN_LOSSES = {"brier_score", "log_loss", "mae", "mse", "rmse", "mean_bias_error"}
25
+
26
+
27
+ def _t_quantile(level: float, df: int) -> float:
28
+ from scipy import stats
29
+
30
+ return float(stats.t.ppf(1 - (1 - level) / 2, df))
31
+
32
+
33
+ def _mean_ci(terms: np.ndarray, level: float) -> tuple[float, float]:
34
+ n = terms.shape[0]
35
+ if n < 2:
36
+ return math.nan, math.nan
37
+ m = float(np.mean(terms))
38
+ se = float(np.std(terms, ddof=1)) / math.sqrt(n)
39
+ q = _t_quantile(level, n - 1)
40
+ return m - q * se, m + q * se
41
+
42
+
43
+ def _analytic(
44
+ result: EvaluationResult,
45
+ y_true: Any,
46
+ y_pred: Any,
47
+ y_prob: Any,
48
+ level: float,
49
+ ) -> dict[str, tuple[float, float, str]]:
50
+ """Closed-form intervals for the metrics that have a standard one (unweighted data only)."""
51
+ from . import proportion_ci, roc_auc_ci
52
+
53
+ out: dict[str, tuple[float, float, str]] = {}
54
+
55
+ def wilson(k: int, n: int) -> Optional[tuple[float, float, str]]:
56
+ if n <= 0:
57
+ return None
58
+ ci = proportion_ci(int(k), int(n), level=level)
59
+ return ci.low, ci.high, "wilson"
60
+
61
+ if result.task == "classification":
62
+ cm = result.confusion_matrix
63
+ labels = list(result.labels or ())
64
+ for name, m in result.metrics.items():
65
+ if isinstance(m.value, np.ndarray):
66
+ continue
67
+ if name == "accuracy" and cm is not None:
68
+ c = wilson(int(np.trace(cm)), int(cm.sum()))
69
+ if c:
70
+ out[name] = c
71
+ elif name in _PROPORTIONS and cm is not None and m.params.get("average") == "binary":
72
+ pos = m.params.get("pos_label")
73
+ if pos not in labels:
74
+ continue
75
+ i = labels.index(pos)
76
+ tp = int(cm[i, i])
77
+ fp = int(cm[:, i].sum()) - tp
78
+ fn = int(cm[i, :].sum()) - tp
79
+ tn = int(cm.sum()) - tp - fp - fn
80
+ k, n = {
81
+ "precision": (tp, tp + fp),
82
+ "ppv": (tp, tp + fp),
83
+ "recall": (tp, tp + fn),
84
+ "sensitivity": (tp, tp + fn),
85
+ "specificity": (tn, tn + fp),
86
+ "npv": (tn, tn + fn),
87
+ }[name]
88
+ c = wilson(k, n)
89
+ if c:
90
+ out[name] = c
91
+ elif result.target_type == "binary" and y_prob is not None and np.ndim(y_prob) == 1:
92
+ pos = m.params.get("pos_label")
93
+ if name == "roc_auc":
94
+ ci = roc_auc_ci(y_true, y_prob, level=level, pos_label=pos)
95
+ out[name] = (ci.low, ci.high, "delong")
96
+ elif name in ("brier_score", "log_loss"):
97
+ yt = np.asarray(y_true)
98
+ positive = pos if pos is not None else (labels[-1] if labels else 1)
99
+ y = (yt == positive).astype(float)
100
+ p = np.asarray(y_prob, dtype=float)
101
+ if name == "brier_score":
102
+ terms = (p - y) ** 2
103
+ else:
104
+ eps = np.finfo(np.float64).eps
105
+ q = np.clip(p, eps, 1 - eps)
106
+ terms = -(y * np.log(q) + (1 - y) * np.log(1 - q))
107
+ lo, hi = _mean_ci(terms, level)
108
+ out[name] = (max(0.0, lo), hi, "t")
109
+ elif result.task == "regression" and np.ndim(y_true) == 1:
110
+ e = np.asarray(y_pred, dtype=float) - np.asarray(y_true, dtype=float)
111
+ for name in result.metrics:
112
+ if name == "mae":
113
+ lo, hi = _mean_ci(np.abs(e), level)
114
+ out[name] = (max(0.0, lo), hi, "t")
115
+ elif name in ("mse", "rmse"):
116
+ lo, hi = _mean_ci(e * e, level)
117
+ lo = max(0.0, lo)
118
+ out[name] = (lo, hi, "t") if name == "mse" else (math.sqrt(lo), math.sqrt(hi), "t (from MSE)")
119
+ elif name == "mean_bias_error":
120
+ lo, hi = _mean_ci(e, level)
121
+ out[name] = (lo, hi, "t")
122
+ return out
123
+
124
+
125
+ def _metric_kwargs(names: list[str], result: EvaluationResult) -> dict[str, dict[str, Any]]:
126
+ """Options that reproduce each metric exactly as evaluate() computed it."""
127
+ from .stats._resolve import resolve_metric
128
+
129
+ out: dict[str, dict[str, Any]] = {}
130
+ for name in names:
131
+ fn, _ = resolve_metric(name)
132
+ accepted = set(inspect.signature(fn).parameters)
133
+ params = dict(result.metrics[name].params)
134
+ kw: dict[str, Any] = {
135
+ k: params[k] for k in ("average", "pos_label", "zero_division") if k in accepted and k in params
136
+ }
137
+ if "average" in kw and kw["average"] in ("auto",):
138
+ kw.pop("average")
139
+ out[name] = kw
140
+ return out
141
+
142
+
143
+ def attach(
144
+ result: EvaluationResult,
145
+ y_true: Any,
146
+ y_pred: Any,
147
+ y_prob: Any,
148
+ *,
149
+ ci: Any,
150
+ level: float,
151
+ baseline_pred: Any,
152
+ baseline_prob: Any,
153
+ n_resamples: int,
154
+ random_state: Optional[int],
155
+ sample_weight: Any,
156
+ ) -> EvaluationResult:
157
+ """Return ``result`` with intervals in each metric's params (``ci_low``, ``ci_high``, ``ci_level``,
158
+ ``ci_method``) and, with a baseline, the paired comparison (``baseline_*`` params and ``comparison``)."""
159
+ if ci in (None, False, "none"):
160
+ mode = "none"
161
+ elif ci is True or ci == "analytic":
162
+ mode = "analytic"
163
+ elif ci == "bootstrap":
164
+ mode = "bootstrap"
165
+ else:
166
+ raise InputValidationError("ci must be 'analytic' (default), 'bootstrap', or False.")
167
+ has_baseline = baseline_pred is not None or baseline_prob is not None
168
+ if mode == "none" and not has_baseline:
169
+ return result
170
+ names = [k for k, m in result.metrics.items() if not isinstance(m.value, np.ndarray)]
171
+ intervals: dict[str, tuple[float, float, str]] = {}
172
+ if mode == "analytic" and sample_weight is None:
173
+ intervals = _analytic(result, y_true, y_pred, y_prob, level)
174
+ comparison = None
175
+ if mode == "bootstrap" or has_baseline:
176
+ from .stats.compare import compare
177
+
178
+ preds: dict[str, Any] = {}
179
+ probs: dict[str, Any] = {}
180
+ if y_pred is not None:
181
+ preds["model"] = y_pred
182
+ if y_prob is not None:
183
+ probs["model"] = y_prob
184
+ if baseline_pred is not None:
185
+ preds["baseline"] = baseline_pred
186
+ if baseline_prob is not None:
187
+ probs["baseline"] = baseline_prob
188
+ from .stats.compare import _needs_prob
189
+
190
+ usable = [n for n in names if not has_baseline or ("baseline" in (probs if _needs_prob(n) else preds))]
191
+ if has_baseline and not usable:
192
+ raise InputValidationError(
193
+ "The baseline needs the same kind of input as the metrics: baseline_pred for label/value metrics, "
194
+ "baseline_prob for probability metrics."
195
+ )
196
+ comparison = compare(
197
+ y_true,
198
+ preds,
199
+ probabilities=probs,
200
+ metrics=usable,
201
+ baseline="baseline" if has_baseline else None,
202
+ level=level,
203
+ n_resamples=n_resamples,
204
+ random_state=random_state,
205
+ sample_weight=sample_weight,
206
+ metric_kwargs=_metric_kwargs(usable, result),
207
+ _allow_single=True,
208
+ )
209
+ if mode == "bootstrap" and comparison is not None:
210
+ for e in comparison.estimates:
211
+ if e["model"] == "model":
212
+ intervals[e["metric"]] = (e["low"], e["high"], "percentile bootstrap")
213
+ tests = {t["metric"]: t for t in comparison.tests} if comparison is not None and has_baseline else {}
214
+ base_values = (
215
+ {e["metric"]: e["estimate"] for e in comparison.estimates if e["model"] == "baseline"}
216
+ if tests and comparison is not None
217
+ else {}
218
+ )
219
+ metrics: dict[str, MetricResult] = {}
220
+ for key, m in result.metrics.items():
221
+ extra: dict[str, Any] = {}
222
+ if key in intervals:
223
+ lo, hi, method = intervals[key]
224
+ extra.update(ci_low=float(lo), ci_high=float(hi), ci_level=level, ci_method=method)
225
+ if key in tests:
226
+ t = tests[key]
227
+ extra.update(
228
+ baseline_value=float(base_values[key]),
229
+ baseline_difference=float(t["difference"]),
230
+ baseline_ci_low=float(t["ci_low"]),
231
+ baseline_ci_high=float(t["ci_high"]),
232
+ baseline_test=t["test"],
233
+ baseline_p_value=float(t["p_value"]),
234
+ baseline_p_adjusted=float(t["p_adjusted"]),
235
+ )
236
+ metrics[key] = MetricResult(m.metric, m.name, m.value, {**m.params, **extra}, m.labels) if extra else m
237
+ return EvaluationResult(
238
+ task=result.task,
239
+ metrics=metrics,
240
+ n_samples=result.n_samples,
241
+ target_type=result.target_type,
242
+ labels=result.labels,
243
+ confusion_matrix=result.confusion_matrix,
244
+ metadata={
245
+ **result.metadata,
246
+ "ci": mode,
247
+ "ci_level": level,
248
+ **({"n_resamples": n_resamples, "random_state": random_state} if comparison is not None else {}),
249
+ },
250
+ comparison=comparison,
251
+ )
@@ -138,8 +138,15 @@ def evaluate(
138
138
  pos_label: Any = None,
139
139
  sample_weight: Optional[ArrayLike] = None,
140
140
  zero_division: ZeroDivision = "warn",
141
+ ci: Any = "analytic",
142
+ level: float = 0.95,
143
+ baseline_pred: Optional[ArrayLike] = None,
144
+ baseline_prob: Optional[ArrayLike] = None,
145
+ n_resamples: int = 1000,
146
+ random_state: Optional[int] = 0,
141
147
  ) -> EvaluationResult:
142
- """Evaluate predictions with a standard set of metrics (or the ``metrics`` you name).
148
+ """Evaluate predictions with a standard set of metrics (or the ``metrics`` you name), with confidence
149
+ intervals and, given a baseline, paired significance tests against it.
143
150
 
144
151
  The task is inferred when omitted: probabilities or integer/string labels mean classification, non-integer
145
152
  numbers mean regression. Inputs are validated once and shared intermediate results (the confusion matrix)
@@ -149,6 +156,15 @@ def evaluate(
149
156
  >>> r = es.evaluate([0, 1, 1, 0], [0, 1, 0, 0])
150
157
  >>> round(r["accuracy"], 2)
151
158
  0.75
159
+
160
+ Intervals (``level``, 95% by default) are in each metric's ``params`` (``ci_low``, ``ci_high``,
161
+ ``ci_method``) and in every summary and export. ``ci="analytic"`` (default, no extra cost) gives closed-form
162
+ intervals where a standard one exists: Wilson for accuracy / precision / recall / specificity / NPV, DeLong
163
+ for binary ROC AUC, Student-t for mean losses (Brier, log loss, MAE, MSE, RMSE, mean bias).
164
+ ``ci="bootstrap"`` gives paired percentile-bootstrap intervals for every metric (``n_resamples``, seeded by
165
+ ``random_state``); ``ci=False`` turns them off. ``baseline_pred`` / ``baseline_prob`` (e.g. the current model)
166
+ add the difference, its interval and a paired test per metric (McNemar for accuracy, DeLong for ROC AUC,
167
+ paired bootstrap otherwise; Holm-adjusted), as ``baseline_*`` params and ``result.comparison``.
152
168
  """
153
169
  if isinstance(y_true, (list, tuple)) and y_true and isinstance(y_true[0], dict):
154
170
  raise UnsupportedTaskError(
@@ -162,14 +178,30 @@ def evaluate(
162
178
  )
163
179
  task = task or _infer_task(y_true, y_prob)
164
180
  if task == "classification":
165
- return _evaluate_classification(
181
+ result = _evaluate_classification(
166
182
  y_true, y_pred, y_prob, metrics, average, labels, pos_label, sample_weight, zero_division
167
183
  )
168
- if task == "regression":
184
+ elif task == "regression":
169
185
  if y_pred is None:
170
186
  raise InputValidationError("Regression evaluation needs y_pred.")
171
- return _evaluate_regression(y_true, y_pred, metrics, sample_weight)
172
- raise UnsupportedTaskError("task must be 'classification' or 'regression' in EvalSuite 0.1.")
187
+ result = _evaluate_regression(y_true, y_pred, metrics, sample_weight)
188
+ else:
189
+ raise UnsupportedTaskError("task must be 'classification' or 'regression' in EvalSuite 0.1.")
190
+ from ._evalci import attach
191
+
192
+ return attach(
193
+ result,
194
+ y_true,
195
+ y_pred,
196
+ y_prob,
197
+ ci=ci,
198
+ level=level,
199
+ baseline_pred=baseline_pred,
200
+ baseline_prob=baseline_prob,
201
+ n_resamples=n_resamples,
202
+ random_state=random_state,
203
+ sample_weight=sample_weight,
204
+ )
173
205
 
174
206
 
175
207
  def _metadata(**extra: Any) -> dict[str, Any]: