evalsuite-python 1.4.0__tar.gz → 2.1.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 (186) hide show
  1. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/CHANGELOG.md +80 -0
  2. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/PKG-INFO +31 -8
  3. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/README.md +22 -7
  4. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/pyproject.toml +7 -0
  5. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/Cargo.lock +18 -15
  6. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/Cargo.toml +1 -1
  7. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-py/src/lib.rs +83 -0
  8. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/__init__.py +299 -8
  9. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/_bench_metrics.py +136 -1
  10. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/agreement.py +8 -0
  11. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/api.py +15 -2
  12. evalsuite_python-2.1.0/src/evalsuite/auto_report.py +288 -0
  13. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/bayes.py +42 -13
  14. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/benchmarks.py +14 -0
  15. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/calibration.py +4 -0
  16. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/cards.py +86 -9
  17. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/cli/main.py +196 -5
  18. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/clinical/report.py +109 -1
  19. evalsuite_python-2.1.0/src/evalsuite/comparisons.py +593 -0
  20. evalsuite_python-2.1.0/src/evalsuite/conformal.py +715 -0
  21. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/exceptions.py +17 -0
  22. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/registry.py +56 -0
  23. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/result.py +8 -0
  24. evalsuite_python-2.1.0/src/evalsuite/data_quality.py +1233 -0
  25. evalsuite_python-2.1.0/src/evalsuite/dataframe.py +123 -0
  26. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/drift.py +4 -0
  27. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/fairness.py +4 -0
  28. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/forecasting.py +4 -0
  29. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/harness.py +6 -1
  30. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/html_report.py +80 -0
  31. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/judging.py +8 -0
  32. evalsuite_python-2.1.0/src/evalsuite/llm_eval.py +745 -0
  33. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/multilabel.py +72 -5
  34. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/plot.py +92 -0
  35. evalsuite_python-2.1.0/src/evalsuite/pytest_plugin.py +29 -0
  36. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/rag_report.py +4 -0
  37. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/recalibration.py +7 -0
  38. evalsuite_python-2.1.0/src/evalsuite/reclassification.py +366 -0
  39. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/reporting.py +4 -0
  40. evalsuite_python-2.1.0/src/evalsuite/slices.py +315 -0
  41. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/_resolve.py +6 -1
  42. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/compare.py +17 -3
  43. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/paired.py +53 -21
  44. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/planning.py +41 -0
  45. evalsuite_python-2.1.0/src/evalsuite/streaming.py +384 -0
  46. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/survival.py +280 -3
  47. evalsuite_python-2.1.0/src/evalsuite/testing.py +90 -0
  48. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/judge.py +54 -3
  49. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/report.py +4 -0
  50. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/version.py +1 -1
  51. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/vision/__init__.py +9 -1
  52. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/vision/detection.py +4 -0
  53. evalsuite_python-2.1.0/src/evalsuite/vision/keypoints.py +280 -0
  54. evalsuite_python-2.1.0/src/evalsuite/vision/panoptic.py +218 -0
  55. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/vision/segmentation.py +4 -0
  56. evalsuite_python-2.1.0/src/evalsuite/workflow.py +423 -0
  57. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/output/test_benchmarks.py +4 -2
  58. evalsuite_python-2.1.0/tests/test_properties.py +108 -0
  59. evalsuite_python-2.1.0/tests/test_v200.py +642 -0
  60. evalsuite_python-2.1.0/tests/test_v210.py +883 -0
  61. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/CONTRIBUTING.md +0 -0
  62. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/LICENSE +0 -0
  63. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/LICENSE-APACHE +0 -0
  64. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/Cargo.toml +0 -0
  65. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/README.md +0 -0
  66. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/agreement.rs +0 -0
  67. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/coco.rs +0 -0
  68. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/curve.rs +0 -0
  69. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/groups.rs +0 -0
  70. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/hash.rs +0 -0
  71. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/lib.rs +0 -0
  72. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/meteor.rs +0 -0
  73. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/permutation.rs +0 -0
  74. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/qa.rs +0 -0
  75. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/ranks.rs +0 -0
  76. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/resample.rs +0 -0
  77. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/surface.rs +0 -0
  78. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/survival.rs +0 -0
  79. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/ter.rs +0 -0
  80. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-core/src/text.rs +0 -0
  81. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/rust/evalsuite-py/Cargo.toml +0 -0
  82. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/__main__.py +0 -0
  83. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/_evalci.py +0 -0
  84. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/_lazy.py +0 -0
  85. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/_native.py +0 -0
  86. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/_update.py +0 -0
  87. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/cache.py +0 -0
  88. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/classification/__init__.py +0 -0
  89. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/classification/_common.py +0 -0
  90. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/classification/metrics.py +0 -0
  91. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/cli/__init__.py +0 -0
  92. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/clinical/__init__.py +0 -0
  93. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/clinical/metrics.py +0 -0
  94. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/__init__.py +0 -0
  95. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/context.py +0 -0
  96. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/export.py +0 -0
  97. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/types.py +0 -0
  98. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/core/validation.py +0 -0
  99. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/integrations.py +0 -0
  100. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llm_benchmarks.py +0 -0
  101. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/__init__.py +0 -0
  102. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/_common.py +0 -0
  103. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/agents.py +0 -0
  104. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/code.py +0 -0
  105. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/efficiency.py +0 -0
  106. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/longcontext.py +0 -0
  107. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/multilingual.py +0 -0
  108. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/robustness.py +0 -0
  109. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/safety.py +0 -0
  110. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/llmsys/uncertainty.py +0 -0
  111. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/monitor.py +0 -0
  112. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/py.typed +0 -0
  113. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/regression/__init__.py +0 -0
  114. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/regression/metrics.py +0 -0
  115. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/__init__.py +0 -0
  116. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/effect.py +0 -0
  117. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/hypothesis.py +0 -0
  118. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/intervals.py +0 -0
  119. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/stats/results.py +0 -0
  120. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/__init__.py +0 -0
  121. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/_common.py +0 -0
  122. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/factuality.py +0 -0
  123. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/generation.py +0 -0
  124. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/qa.py +0 -0
  125. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/rag.py +0 -0
  126. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/reasoning.py +0 -0
  127. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/retrieval.py +0 -0
  128. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/semantic.py +0 -0
  129. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/spice.py +0 -0
  130. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/src/evalsuite/text/structured.py +0 -0
  131. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/__init__.py +0 -0
  132. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/classification/__init__.py +0 -0
  133. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/classification/test_against_sklearn.py +0 -0
  134. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/clinical/__init__.py +0 -0
  135. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/clinical/test_outputs.py +0 -0
  136. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/clinical/test_v020.py +0 -0
  137. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/conftest.py +0 -0
  138. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/integration/__init__.py +0 -0
  139. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/integration/test_qa.py +0 -0
  140. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/integration/test_readme_examples.py +0 -0
  141. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/integration/test_repo_hygiene.py +0 -0
  142. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/__init__.py +0 -0
  143. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/test_code_longcontext_efficiency.py +0 -0
  144. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/test_edges.py +0 -0
  145. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/test_fast_text.py +0 -0
  146. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/test_hardening.py +0 -0
  147. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/test_safety_robustness.py +0 -0
  148. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/llmsys/test_uncertainty_agents_multilingual.py +0 -0
  149. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/output/__init__.py +0 -0
  150. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/output/test_cli.py +0 -0
  151. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/output/test_plot.py +0 -0
  152. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/output/test_reporting.py +0 -0
  153. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/regression/__init__.py +0 -0
  154. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/regression/test_against_sklearn.py +0 -0
  155. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/stats/__init__.py +0 -0
  156. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/stats/test_branches.py +0 -0
  157. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/stats/test_compare.py +0 -0
  158. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/stats/test_fast_paths.py +0 -0
  159. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/stats/test_reference.py +0 -0
  160. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_cache.py +0 -0
  161. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_cards.py +0 -0
  162. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_harness.py +0 -0
  163. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_integrations.py +0 -0
  164. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_monitor.py +0 -0
  165. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_native.py +0 -0
  166. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_update.py +0 -0
  167. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v111_fixes.py +0 -0
  168. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v12.py +0 -0
  169. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v121.py +0 -0
  170. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v121_coverage.py +0 -0
  171. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v13.py +0 -0
  172. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v135.py +0 -0
  173. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v13_edges.py +0 -0
  174. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/test_v140.py +0 -0
  175. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/text/__init__.py +0 -0
  176. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/text/test_against_references.py +0 -0
  177. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/text/test_text_edges.py +0 -0
  178. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/text/test_v040.py +0 -0
  179. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/unit/__init__.py +0 -0
  180. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/unit/test_core.py +0 -0
  181. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/unit/test_edges.py +0 -0
  182. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/vision/__init__.py +0 -0
  183. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/vision/test_detection.py +0 -0
  184. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/vision/test_edges.py +0 -0
  185. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/vision/test_outputs.py +0 -0
  186. {evalsuite_python-1.4.0 → evalsuite_python-2.1.0}/tests/vision/test_segmentation.py +0 -0
@@ -6,6 +6,86 @@ All notable changes to this project are documented here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.1.0] - 2026-11-30
10
+
11
+ Existing results are unchanged; everything below is new API, opt-in options or speed-ups with identical results,
12
+ apart from the fixes listed.
13
+
14
+ ### Added
15
+ - **Statistics**: `sample_size_sensitivity_specificity` (Buderer 1996); `clustered_comparison` (GEE or linear mixed
16
+ model for repeated measures per patient, site or reader; `pip install evalsuite-python[stats]`);
17
+ `compare(..., correction_scope="all")` to adjust p-values across every metric at once.
18
+ - **Conformal**: `conformal_risk_control`, `conformal_multilabel` (false-negative-rate control) and
19
+ `adaptive_conformal` (adaptive conformal inference for time series).
20
+ - **Clinical**: `decision_curve(..., n_resamples=)` bootstrap intervals and paired two-model differences;
21
+ `n_resamples=` intervals for `time_dependent_auc`, `brier_score_survival` and `integrated_brier_score`;
22
+ `survival_calibration` (observed vs predicted survival at a time, O/E ratio, ICI); `find_failing_slices`
23
+ (subgroup failure search with FDR-adjusted tests); TRIPOD-LLM and DECIDE-AI checklists in `report_card`.
24
+ - **LLM**: `bradley_terry(..., n_resamples=)` rating and rank intervals; `run_model` with Gemini, Mistral and any
25
+ OpenAI-compatible server (Ollama, vLLM, `base_url=`), rate-limit back-off honouring `Retry-After`, no retries on
26
+ errors that cannot succeed, and atomic cache writes with automatic repair of damaged entries.
27
+ - **Data quality**: `data_issues` (duplicates, near duplicates, conflicting labels, outliers, constant / sparse /
28
+ mixed-type columns, repeated IDs); `label_issues_multilabel` (matches cleanlab) and `label_issues_regression`;
29
+ `annotator_report` (per-annotator agreement and kappa, Krippendorff's alpha, flagged annotators).
30
+ - **Vision**: `panoptic_quality` (PQ / SQ / RQ, matches panopticapi) and `keypoint_oks` / `keypoint_ap` (matches
31
+ pycocotools' keypoint evaluation).
32
+ - **Ease of use**: interactive HTML reports (sortable tables, row filter, section menu, metric definitions on hover,
33
+ light / dark switch; `auto_report(..., interactive=False)` for the static page); `es.explain("mcc")`;
34
+ `evalsuite report --dry-run`, `--target / --pred / --prob`; `evalsuite compare file.csv` finds `pred_<model>` /
35
+ `prob_<model>` columns; `detect_models`.
36
+ - **Workflow**: `assert_metric` / `assert_no_regression` and a pytest plugin with those fixtures;
37
+ `evalsuite evaluate --record / --check-history`; `evalsuite history diff | html` (trend page with intervals);
38
+ `history` / `model` / `record` inputs for the GitHub Action; `evalsuite serve --token` (or `$EVALSUITE_TOKEN`)
39
+ and a request time limit.
40
+ - **Engine**: `StreamingClassification`, `StreamingRegression` and `stream_evaluate` for data larger than memory
41
+ (results equal `evaluate` on all the data); standalone `label_ranking_average_precision`, `coverage_error` and
42
+ `ranking_loss` (match scikit-learn; LRAP about 100× faster).
43
+ - Getting-started guides in the documentation (conformal, data quality, checklists, LLMs, workflow) and a computer
44
+ vision API page.
45
+
46
+ ### Changed
47
+ - Faster, with identical results: the Bayesian correlated t-test (about 10×), MinHash text signatures in the
48
+ compiled core (about 8×), and near-duplicate text search, which now groups identical texts first (3,000 notes:
49
+ 10 s → 0.05 s).
50
+
51
+ ### Fixed
52
+ - The per-metric benchmark's multi-label rows now time single metrics against single scikit-learn functions.
53
+
54
+ ## [2.0.0] - 2026-11-28
55
+
56
+ A major feature release. Existing results are unchanged; every addition is new API.
57
+
58
+ ### Added
59
+ - **Conformal prediction**: `conformal_classification` (LAC, APS, RAPS; per-class or per-group coverage) and
60
+ `conformal_regression` (absolute, normalized, CQR), with coverage, set-size and width reports.
61
+ - **`evalsuite report data.csv`** / `auto_report`: detects the task and columns and writes a full HTML report.
62
+ - **Data quality**: `leakage_report` (exact / near duplicates, shared IDs, MinHash text near-duplicates, target
63
+ leakage), `label_issues` (confident learning, matches cleanlab), `dataset_card`.
64
+ - **Checklists**: STARD (with the 2×2 table) and CONSORT-AI, auto-filled like TRIPOD+AI.
65
+ - **Statistics**: `noninferiority_test`, `equivalence_test` (TOST), `nemenyi_test` (matches scikit-posthocs),
66
+ `ipw_metric`; plots `critical_difference` and `forest`.
67
+ - **Clinical**: `reclassification` (categorical and continuous NRI, IDI) and `external_validation`.
68
+ - **LLM and AI systems**: `run_model` (OpenAI, Anthropic or any callable; on-disk cache, concurrency, retries;
69
+ keys only from environment variables), `agent_report`, `conversation_report`, `cost_quality_report` with a
70
+ Pareto front, `contamination_check`.
71
+ - **Workflow**: `log_to_mlflow`, `log_to_wandb`, `record_history` / `check_regression` (`evalsuite history`),
72
+ `evalsuite serve`, `df.evalsuite` for pandas and Polars, a Dockerfile.
73
+ - **Ease of use**: did-you-mean suggestions for misspelt functions and metrics, `_repr_html_` on every report,
74
+ `EvalSuiteDeprecationWarning` and a deprecation policy.
75
+ - **Trust and reach**: documentation site (MkDocs), conda recipe, build provenance attestation and CycloneDX
76
+ SBOM on releases, OpenSSF Scorecard; Hypothesis property tests.
77
+ - The per-metric benchmark now covers the 1.3 and 2.0 functions against pingouin, cleanlab, scikit-posthocs,
78
+ baycomp, properscoring and scikit-learn.
79
+
80
+ ### Changed
81
+ - Faster, with identical results: isotonic recalibration (pool-adjacent-violators in the compiled core; about 2×
82
+ at 100,000 rows), `nemenyi_test` (about 5×) and `bayes_correlated_ttest` (about 5×; posterior draws are made
83
+ only when `.samples` is used).
84
+
85
+ ### Fixed
86
+ - `label_issues` now matches cleanlab's confident learning exactly (an example whose most likely class is its
87
+ given label is never flagged; with several confident classes the most likely one is suggested).
88
+
9
89
  ## [1.4.0] - 2026-11-28
10
90
 
11
91
  Smoother, cleaner and easier to keep tidy. Results are unchanged.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: evalsuite-python
3
- Version: 1.4.0
3
+ Version: 2.1.0
4
4
  Classifier: Development Status :: 5 - Production/Stable
5
5
  Classifier: Intended Audience :: Science/Research
6
6
  Classifier: Intended Audience :: Healthcare Industry
@@ -26,6 +26,7 @@ Requires-Dist: pandas>=1.4
26
26
  Requires-Dist: matplotlib>=3.5 ; extra == 'all'
27
27
  Requires-Dist: pillow>=9 ; extra == 'all'
28
28
  Requires-Dist: nltk>=3.8 ; extra == 'all'
29
+ Requires-Dist: anthropic>=0.30 ; extra == 'anthropic'
29
30
  Requires-Dist: datasets>=2.14 ; extra == 'benchmarks'
30
31
  Requires-Dist: pytest>=7 ; extra == 'dev'
31
32
  Requires-Dist: pytest-cov>=4 ; extra == 'dev'
@@ -54,24 +55,31 @@ Requires-Dist: build ; extra == 'dev'
54
55
  Requires-Dist: twine ; extra == 'dev'
55
56
  Requires-Dist: pip-audit ; extra == 'dev'
56
57
  Requires-Dist: python-docx>=1.0 ; extra == 'docx'
58
+ Requires-Dist: google-genai>=1.0 ; extra == 'gemini'
57
59
  Requires-Dist: keras>=3 ; extra == 'keras'
58
60
  Requires-Dist: lightning>=2 ; extra == 'lightning'
59
61
  Requires-Dist: nltk>=3.8 ; extra == 'llm'
60
62
  Requires-Dist: mlflow>=2 ; extra == 'mlflow'
63
+ Requires-Dist: openai>=1.0 ; extra == 'openai'
61
64
  Requires-Dist: matplotlib>=3.5 ; extra == 'plot'
62
65
  Requires-Dist: scikit-learn>=1.2 ; extra == 'sklearn'
66
+ Requires-Dist: statsmodels>=0.13 ; extra == 'stats'
63
67
  Requires-Dist: pillow>=9 ; extra == 'vision'
64
68
  Requires-Dist: wandb>=0.16 ; extra == 'wandb'
65
69
  Provides-Extra: all
70
+ Provides-Extra: anthropic
66
71
  Provides-Extra: benchmarks
67
72
  Provides-Extra: dev
68
73
  Provides-Extra: docx
74
+ Provides-Extra: gemini
69
75
  Provides-Extra: keras
70
76
  Provides-Extra: lightning
71
77
  Provides-Extra: llm
72
78
  Provides-Extra: mlflow
79
+ Provides-Extra: openai
73
80
  Provides-Extra: plot
74
81
  Provides-Extra: sklearn
82
+ Provides-Extra: stats
75
83
  Provides-Extra: vision
76
84
  Provides-Extra: wandb
77
85
  License-File: LICENSE
@@ -94,6 +102,7 @@ Project-URL: Source, https://github.com/mkcs28/evalsuite-python
94
102
  [![CI](https://github.com/mkcs28/evalsuite-python/actions/workflows/ci.yml/badge.svg)](https://github.com/mkcs28/evalsuite-python/actions/workflows/ci.yml)
95
103
  [![PyPI](https://img.shields.io/pypi/v/evalsuite-python)](https://pypi.org/project/evalsuite-python/)
96
104
  [![Python](https://img.shields.io/pypi/pyversions/evalsuite-python)](https://pypi.org/project/evalsuite-python/)
105
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/mkcs28/evalsuite-python/badge)](https://scorecard.dev/viewer/?uri=github.com/mkcs28/evalsuite-python)
97
106
  [![License: MIT OR Apache-2.0](https://img.shields.io/badge/License-MIT%20OR%20Apache--2.0-blue.svg)](#license)
98
107
 
99
108
  **Unified, reproducible evaluation for machine learning, LLM and research.**
@@ -104,11 +113,26 @@ evaluation into one consistent, validated, documented framework.
104
113
  > **On an older version? Upgrade once:** `pip install -U evalsuite-python`. From 1.1.2 on, EvalSuite tells you
105
114
  > when a newer release is out (`evalsuite upgrade`).
106
115
 
107
- > **Status: stable (1.4.0).** [Example notebooks](notebooks/README.md) (Colab) ·
116
+ > **Status: stable (2.1.0).** [Example notebooks](notebooks/README.md) (Colab) ·
108
117
  > [in-browser tools](https://evalsuite-nine.vercel.app/tools) · [changelog](CHANGELOG.md)
109
118
 
110
119
  **What's new**
111
120
 
121
+ - **2.1** — interactive HTML reports; `es.explain`; a pytest plugin (`assert_metric`) and evaluation history with
122
+ regression checks in the CLI and the GitHub Action; streaming evaluation for data larger than memory; subgroup
123
+ failure search; conformal risk control, multi-label and time-series conformal; GEE / mixed-model comparison
124
+ for clustered data; decision-curve and survival intervals, survival calibration; TRIPOD-LLM and DECIDE-AI
125
+ checklists; `data_issues`, multi-label and regression label issues, annotator reports; panoptic quality and
126
+ keypoint AP; Gemini, Mistral and local OpenAI-compatible models in `run_model`.
127
+ - **2.0** — conformal prediction (LAC / APS / RAPS sets, absolute / normalized / CQR intervals, per-group
128
+ coverage); `evalsuite report data.csv` works out the task and writes a full HTML report; leakage checks
129
+ (exact and near duplicates, shared IDs, text near-duplicates, target leakage), label-issue finding
130
+ (cleanlab-exact) and dataset cards; STARD and CONSORT-AI checklists next to TRIPOD+AI; non-inferiority,
131
+ equivalence (TOST), Nemenyi with critical-difference plots, NRI / IDI, external validation, forest plots and
132
+ IPW metrics; LLM runs with caching (`run_model`), agent, conversation and cost–quality reports and a
133
+ contamination check; MLflow / W&B logging, an evaluation history with regression checks, `evalsuite serve`,
134
+ `df.evalsuite`; did-you-mean errors and notebook display for every report; a docs site, conda recipe, signed
135
+ build provenance and an SBOM.
112
136
  - **1.4** — a cache you can see and clear (`evalsuite cache info` / `clear`), cleared automatically (unused for
113
137
  90 days or beyond 2 GB); a package-wide fuzz: non-numeric input now raises a clear `InputValidationError`
114
138
  naming the argument in every function, and wrong argument types are explained; every feature area loads
@@ -618,7 +642,7 @@ scripts, no external requests).
618
642
  ## Evaluation in pull requests
619
643
 
620
644
  ```yaml
621
- - uses: mkcs28/evalsuite-python@v1.4.0
645
+ - uses: mkcs28/evalsuite-python@v2.1.0
622
646
  with:
623
647
  predictions: predictions.csv
624
648
  y-true: label
@@ -739,11 +763,10 @@ metric calls. At 1,000,000 samples (pixels for segmentation; 1,000 images for de
739
763
  | text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 219.5 | 889.0 | **4.05×** |
740
764
  | text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 266.7 | 2399.8 | **9.00×** |
741
765
 
742
- **Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`, re-run on 1.2.0): all 225 registered
743
- metrics and statistics functions at 10,000 and 100,000 samples. 82 are compared with a reference library, 118
744
- with an independent textbook formula and 25 (learned, judge-dependent, randomised, or whose reference library was
745
- not installed) are timed alone; **all 200 comparisons agree**, and against the libraries the geometric-mean
746
- speed-up is **5.50×** (164 of 164 measurements faster). Per-metric table in BENCHMARKS.md.
766
+ **Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`, re-run on 2.1.0): all 240 registered
767
+ metrics and statistics functions at 10,000 and 100,000 samples. 92 are compared with a reference library, 120 with
768
+ an independent textbook formula and 28 are timed alone; **all 212 comparisons agree**, and against the libraries
769
+ the geometric-mean speed-up is **6.78×** (177 of 184 measurements faster). Per-metric table in BENCHMARKS.md.
747
770
 
748
771
  **Nearly every workload is faster than its reference.** The text metrics (BLEU, chrF, TER, ROUGE, METEOR, CIDEr,
749
772
  CodeBLEU's n-gram terms, distinct-n), the whole COCO evaluation (IoU, score sort, matching, accumulation),
@@ -3,6 +3,7 @@
3
3
  [![CI](https://github.com/mkcs28/evalsuite-python/actions/workflows/ci.yml/badge.svg)](https://github.com/mkcs28/evalsuite-python/actions/workflows/ci.yml)
4
4
  [![PyPI](https://img.shields.io/pypi/v/evalsuite-python)](https://pypi.org/project/evalsuite-python/)
5
5
  [![Python](https://img.shields.io/pypi/pyversions/evalsuite-python)](https://pypi.org/project/evalsuite-python/)
6
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/mkcs28/evalsuite-python/badge)](https://scorecard.dev/viewer/?uri=github.com/mkcs28/evalsuite-python)
6
7
  [![License: MIT OR Apache-2.0](https://img.shields.io/badge/License-MIT%20OR%20Apache--2.0-blue.svg)](#license)
7
8
 
8
9
  **Unified, reproducible evaluation for machine learning, LLM and research.**
@@ -13,11 +14,26 @@ evaluation into one consistent, validated, documented framework.
13
14
  > **On an older version? Upgrade once:** `pip install -U evalsuite-python`. From 1.1.2 on, EvalSuite tells you
14
15
  > when a newer release is out (`evalsuite upgrade`).
15
16
 
16
- > **Status: stable (1.4.0).** [Example notebooks](notebooks/README.md) (Colab) ·
17
+ > **Status: stable (2.1.0).** [Example notebooks](notebooks/README.md) (Colab) ·
17
18
  > [in-browser tools](https://evalsuite-nine.vercel.app/tools) · [changelog](CHANGELOG.md)
18
19
 
19
20
  **What's new**
20
21
 
22
+ - **2.1** — interactive HTML reports; `es.explain`; a pytest plugin (`assert_metric`) and evaluation history with
23
+ regression checks in the CLI and the GitHub Action; streaming evaluation for data larger than memory; subgroup
24
+ failure search; conformal risk control, multi-label and time-series conformal; GEE / mixed-model comparison
25
+ for clustered data; decision-curve and survival intervals, survival calibration; TRIPOD-LLM and DECIDE-AI
26
+ checklists; `data_issues`, multi-label and regression label issues, annotator reports; panoptic quality and
27
+ keypoint AP; Gemini, Mistral and local OpenAI-compatible models in `run_model`.
28
+ - **2.0** — conformal prediction (LAC / APS / RAPS sets, absolute / normalized / CQR intervals, per-group
29
+ coverage); `evalsuite report data.csv` works out the task and writes a full HTML report; leakage checks
30
+ (exact and near duplicates, shared IDs, text near-duplicates, target leakage), label-issue finding
31
+ (cleanlab-exact) and dataset cards; STARD and CONSORT-AI checklists next to TRIPOD+AI; non-inferiority,
32
+ equivalence (TOST), Nemenyi with critical-difference plots, NRI / IDI, external validation, forest plots and
33
+ IPW metrics; LLM runs with caching (`run_model`), agent, conversation and cost–quality reports and a
34
+ contamination check; MLflow / W&B logging, an evaluation history with regression checks, `evalsuite serve`,
35
+ `df.evalsuite`; did-you-mean errors and notebook display for every report; a docs site, conda recipe, signed
36
+ build provenance and an SBOM.
21
37
  - **1.4** — a cache you can see and clear (`evalsuite cache info` / `clear`), cleared automatically (unused for
22
38
  90 days or beyond 2 GB); a package-wide fuzz: non-numeric input now raises a clear `InputValidationError`
23
39
  naming the argument in every function, and wrong argument types are explained; every feature area loads
@@ -527,7 +543,7 @@ scripts, no external requests).
527
543
  ## Evaluation in pull requests
528
544
 
529
545
  ```yaml
530
- - uses: mkcs28/evalsuite-python@v1.4.0
546
+ - uses: mkcs28/evalsuite-python@v2.1.0
531
547
  with:
532
548
  predictions: predictions.csv
533
549
  y-true: label
@@ -648,11 +664,10 @@ metric calls. At 1,000,000 samples (pixels for segmentation; 1,000 images for de
648
664
  | text: ROUGE-1, ROUGE-2, ROUGE-L (10000 sentences) | rouge-score | 219.5 | 889.0 | **4.05×** |
649
665
  | text: corpus BLEU and chrF (10000 sentences) | sacreBLEU | 266.7 | 2399.8 | **9.00×** |
650
666
 
651
- **Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`, re-run on 1.2.0): all 225 registered
652
- metrics and statistics functions at 10,000 and 100,000 samples. 82 are compared with a reference library, 118
653
- with an independent textbook formula and 25 (learned, judge-dependent, randomised, or whose reference library was
654
- not installed) are timed alone; **all 200 comparisons agree**, and against the libraries the geometric-mean
655
- speed-up is **5.50×** (164 of 164 measurements faster). Per-metric table in BENCHMARKS.md.
667
+ **Every metric is benchmarked too** (`evalsuite benchmark --suite metrics`, re-run on 2.1.0): all 240 registered
668
+ metrics and statistics functions at 10,000 and 100,000 samples. 92 are compared with a reference library, 120 with
669
+ an independent textbook formula and 28 are timed alone; **all 212 comparisons agree**, and against the libraries
670
+ the geometric-mean speed-up is **6.78×** (177 of 184 measurements faster). Per-metric table in BENCHMARKS.md.
656
671
 
657
672
  **Nearly every workload is faster than its reference.** The text metrics (BLEU, chrF, TER, ROUGE, METEOR, CIDEr,
658
673
  CodeBLEU's n-gram terms, distinct-n), the whole COCO evaluation (IoU, score sort, matching, accumulation),
@@ -49,6 +49,10 @@ mlflow = ["mlflow>=2"]
49
49
  docx = ["python-docx>=1.0"]
50
50
  benchmarks = ["datasets>=2.14"]
51
51
  wandb = ["wandb>=0.16"]
52
+ openai = ["openai>=1.0"]
53
+ gemini = ["google-genai>=1.0"]
54
+ anthropic = ["anthropic>=0.30"]
55
+ stats = ["statsmodels>=0.13"]
52
56
  all = ["matplotlib>=3.5", "pillow>=9", "nltk>=3.8"]
53
57
  dev = [
54
58
  "pytest>=7",
@@ -89,6 +93,9 @@ Changelog = "https://github.com/mkcs28/evalsuite-python/blob/main/CHANGELOG.md"
89
93
  [project.scripts]
90
94
  evalsuite = "evalsuite.cli.main:main"
91
95
 
96
+ [project.entry-points.pytest11]
97
+ evalsuite = "evalsuite.pytest_plugin"
98
+
92
99
  [tool.hatch.version]
93
100
  path = "src/evalsuite/version.py"
94
101
 
@@ -154,9 +154,9 @@ dependencies = [
154
154
 
155
155
  [[package]]
156
156
  name = "clap"
157
- version = "4.5.61"
157
+ version = "4.6.10"
158
158
  source = "registry+https://github.com/rust-lang/crates.io-index"
159
- checksum = "52fa72306bb30daf11bc97773431628e5b4916e97aaa74b7d3f625d4d495da02"
159
+ checksum = "50066ca966813ca8957ee15361752f19424a8ff620dbe9c8993d9f99d99b04b3"
160
160
  dependencies = [
161
161
  "clap_builder",
162
162
  "clap_derive",
@@ -164,9 +164,9 @@ dependencies = [
164
164
 
165
165
  [[package]]
166
166
  name = "clap_builder"
167
- version = "4.5.61"
167
+ version = "4.6.10"
168
168
  source = "registry+https://github.com/rust-lang/crates.io-index"
169
- checksum = "2071365c5c56eae7d77414029dde2f4f4ba151cf68d5a3261c9a40de428ace93"
169
+ checksum = "a0ed97c96ef4efb3cc84e09fa388df4463e7cc3224ec38d7b1d9e45749333590"
170
170
  dependencies = [
171
171
  "anstream",
172
172
  "anstyle",
@@ -176,14 +176,14 @@ dependencies = [
176
176
 
177
177
  [[package]]
178
178
  name = "clap_derive"
179
- version = "4.5.61"
179
+ version = "4.6.9"
180
180
  source = "registry+https://github.com/rust-lang/crates.io-index"
181
- checksum = "dec5be1eea072311774b7b84ded287adbd9f293f9d23456817605c6042f4f5e0"
181
+ checksum = "b4c174f11f949b9ca8c60580925e282b9cbd5454750e506f08648b2038080cd7"
182
182
  dependencies = [
183
183
  "heck",
184
184
  "proc-macro2",
185
185
  "quote",
186
- "syn 2.0.119",
186
+ "syn 3.0.10",
187
187
  ]
188
188
 
189
189
  [[package]]
@@ -319,7 +319,7 @@ checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
319
319
 
320
320
  [[package]]
321
321
  name = "evalsuite"
322
- version = "1.4.0"
322
+ version = "2.1.0"
323
323
  dependencies = [
324
324
  "criterion",
325
325
  "evalsuite-core",
@@ -334,14 +334,14 @@ dependencies = [
334
334
 
335
335
  [[package]]
336
336
  name = "evalsuite-capi"
337
- version = "1.4.0"
337
+ version = "2.1.0"
338
338
  dependencies = [
339
339
  "evalsuite",
340
340
  ]
341
341
 
342
342
  [[package]]
343
343
  name = "evalsuite-cli"
344
- version = "1.4.0"
344
+ version = "2.1.0"
345
345
  dependencies = [
346
346
  "clap",
347
347
  "csv",
@@ -351,14 +351,14 @@ dependencies = [
351
351
 
352
352
  [[package]]
353
353
  name = "evalsuite-core"
354
- version = "1.4.0"
354
+ version = "2.1.0"
355
355
  dependencies = [
356
356
  "rayon",
357
357
  ]
358
358
 
359
359
  [[package]]
360
360
  name = "evalsuite-py"
361
- version = "1.4.0"
361
+ version = "2.1.0"
362
362
  dependencies = [
363
363
  "evalsuite-core",
364
364
  "pyo3",
@@ -367,7 +367,7 @@ dependencies = [
367
367
 
368
368
  [[package]]
369
369
  name = "evalsuite-wasm"
370
- version = "1.4.0"
370
+ version = "2.1.0"
371
371
  dependencies = [
372
372
  "evalsuite",
373
373
  "js-sys",
@@ -911,9 +911,12 @@ checksum = "d902046e6a28a1e4c3cab97258a0ce11e994903f01c2d97a9447a0b3df85f4f6"
911
911
 
912
912
  [[package]]
913
913
  name = "roxmltree"
914
- version = "0.20.0"
914
+ version = "0.21.2"
915
915
  source = "registry+https://github.com/rust-lang/crates.io-index"
916
- checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
916
+ checksum = "9da7f59328b09405b181fee1018925fad50f157afb43c0c0f5c522c256dd5907"
917
+ dependencies = [
918
+ "memchr",
919
+ ]
917
920
 
918
921
  [[package]]
919
922
  name = "rustc-hash"
@@ -3,7 +3,7 @@ members = ["evalsuite-core", "evalsuite-py"]
3
3
  resolver = "2"
4
4
 
5
5
  [workspace.package]
6
- version = "1.4.0"
6
+ version = "2.1.0"
7
7
  edition = "2021"
8
8
  rust-version = "1.82"
9
9
  license = "MIT OR Apache-2.0"
@@ -396,6 +396,87 @@ fn coco_evaluate<'py>(
396
396
  ))
397
397
  }
398
398
 
399
+ /// MinHash signatures: for each set (shingle hashes `h[off[i]..off[i+1]]`) and permutation j, the minimum of
400
+ /// (a[j]·h + b[j]) mod (2^61 − 1) with exact 128-bit arithmetic (as Python's integers), or u64::MAX for an
401
+ /// empty set. Returns n × n_perm values, row-major.
402
+ #[pyfunction]
403
+ fn minhash(
404
+ py: Python<'_>,
405
+ hashes: (usize, usize),
406
+ offsets: Vec<u64>,
407
+ a: Vec<u64>,
408
+ b: Vec<u64>,
409
+ ) -> PyResult<Vec<u64>> {
410
+ let hs: &[u64] = view(hashes.0, hashes.1)?;
411
+ if a.len() != b.len() || offsets.is_empty() {
412
+ return Err(PyValueError::new_err(
413
+ "a and b must match and offsets must not be empty",
414
+ ));
415
+ }
416
+ if *offsets.last().unwrap() as usize != hs.len() || offsets.windows(2).any(|w| w[0] > w[1]) {
417
+ return Err(PyValueError::new_err(
418
+ "offsets must be non-decreasing and end at the number of hashes",
419
+ ));
420
+ }
421
+ const P: u128 = (1u128 << 61) - 1;
422
+ let n = offsets.len() - 1;
423
+ let k = a.len();
424
+ Ok(py.detach(|| {
425
+ let mut out = vec![u64::MAX; n * k];
426
+ out.par_chunks_mut(k).enumerate().for_each(|(i, row)| {
427
+ let set = &hs[offsets[i] as usize..offsets[i + 1] as usize];
428
+ if set.is_empty() {
429
+ return;
430
+ }
431
+ for j in 0..k {
432
+ let (aj, bj) = (a[j] as u128, b[j] as u128);
433
+ let mut best = u128::MAX;
434
+ for &h in set {
435
+ let v = (aj * h as u128 + bj) % P;
436
+ if v < best {
437
+ best = v;
438
+ }
439
+ }
440
+ row[j] = best as u64;
441
+ }
442
+ });
443
+ out
444
+ }))
445
+ }
446
+
447
+ /// Pool-adjacent-violators on per-x means `y` with weights `w` (float64 views of `n` elements): the pooled block
448
+ /// values and block lengths. The same operations in the same order as `evalsuite.recalibration._pava`, so results
449
+ /// are identical bit for bit.
450
+ #[pyfunction]
451
+ fn pava(py: Python<'_>, y: (usize, usize), w: (usize, usize)) -> PyResult<(Vec<f64>, Vec<u64>)> {
452
+ let ys: &[f64] = view(y.0, y.1)?;
453
+ let ws: &[f64] = view(w.0, w.1)?;
454
+ if ys.len() != ws.len() {
455
+ return Err(PyValueError::new_err("y and w must have the same length"));
456
+ }
457
+ Ok(py.detach(|| {
458
+ let mut vals: Vec<f64> = Vec::with_capacity(ys.len());
459
+ let mut wts: Vec<f64> = Vec::with_capacity(ys.len());
460
+ let mut lens: Vec<u64> = Vec::with_capacity(ys.len());
461
+ for (&v, &wt) in ys.iter().zip(ws) {
462
+ vals.push(v);
463
+ wts.push(wt);
464
+ lens.push(1);
465
+ while vals.len() > 1 && vals[vals.len() - 2] > vals[vals.len() - 1] {
466
+ let v2 = vals.pop().unwrap();
467
+ let w2 = wts.pop().unwrap();
468
+ let l2 = lens.pop().unwrap();
469
+ let last = vals.len() - 1;
470
+ let tot = wts[last] + w2;
471
+ vals[last] = (vals[last] * wts[last] + v2 * w2) / tot;
472
+ wts[last] = tot;
473
+ lens[last] += l2;
474
+ }
475
+ }
476
+ (vals, lens)
477
+ }))
478
+ }
479
+
399
480
  /// Harrell's concordance sums `(numerator, denominator, comparable pairs)`. `time`, `risk` and `weight` are float64
400
481
  /// views and `event` a uint8 view, all of `n` elements, kept alive and unchanged by the caller during the call.
401
482
  #[pyfunction]
@@ -1163,6 +1244,8 @@ fn _core(m: &Bound<'_, PyModule>) -> PyResult<()> {
1163
1244
  m.add_function(wrap_pyfunction!(codebleu_stats, m)?)?;
1164
1245
  m.add_function(wrap_pyfunction!(distinct_ngrams, m)?)?;
1165
1246
  m.add_function(wrap_pyfunction!(num_threads, m)?)?;
1247
+ m.add_function(wrap_pyfunction!(pava, m)?)?;
1248
+ m.add_function(wrap_pyfunction!(minhash, m)?)?;
1166
1249
  m.add_function(wrap_pyfunction!(retrieval_scores, m)?)?;
1167
1250
  Ok(())
1168
1251
  }