evalsuite-python 1.2.0__py3-none-any.whl → 1.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- evalsuite/__init__.py +869 -262
- evalsuite/_evalci.py +10 -13
- evalsuite/_native.py +1 -1
- evalsuite/_update.py +2 -1
- evalsuite/core/registry.py +24 -0
- evalsuite/fairness.py +23 -10
- evalsuite/judging.py +36 -9
- evalsuite/rag_report.py +2 -1
- evalsuite/stats/intervals.py +174 -21
- evalsuite/stats/planning.py +2 -0
- evalsuite/survival.py +68 -9
- evalsuite/text/judge.py +36 -29
- evalsuite/version.py +1 -1
- {evalsuite_python-1.2.0.dist-info → evalsuite_python-1.2.1.dist-info}/METADATA +5 -3
- {evalsuite_python-1.2.0.dist-info → evalsuite_python-1.2.1.dist-info}/RECORD +19 -19
- {evalsuite_python-1.2.0.dist-info → evalsuite_python-1.2.1.dist-info}/WHEEL +0 -0
- {evalsuite_python-1.2.0.dist-info → evalsuite_python-1.2.1.dist-info}/entry_points.txt +0 -0
- {evalsuite_python-1.2.0.dist-info → evalsuite_python-1.2.1.dist-info}/licenses/LICENSE +0 -0
- {evalsuite_python-1.2.0.dist-info → evalsuite_python-1.2.1.dist-info}/licenses/LICENSE-APACHE +0 -0
evalsuite/__init__.py
CHANGED
|
@@ -3,337 +3,944 @@
|
|
|
3
3
|
>>> import evalsuite as es
|
|
4
4
|
>>> result = es.evaluate([0, 1, 1, 0], [0, 1, 0, 0])
|
|
5
5
|
>>> print(result.summary()) # doctest: +SKIP
|
|
6
|
+
|
|
7
|
+
Importing EvalSuite loads almost nothing: every function, class and submodule below is imported the first time
|
|
8
|
+
it is used (PEP 562), so ``import evalsuite`` stays fast and only the parts a program touches are ever loaded.
|
|
6
9
|
"""
|
|
7
10
|
|
|
8
|
-
from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
maximum_calibration_error,
|
|
17
|
-
)
|
|
18
|
-
from .cards import ReportCard, report_card
|
|
19
|
-
from .classification import (
|
|
20
|
-
accuracy,
|
|
21
|
-
average_precision,
|
|
22
|
-
balanced_accuracy,
|
|
23
|
-
brier_score,
|
|
24
|
-
calibration_curve,
|
|
25
|
-
cohen_kappa,
|
|
26
|
-
confusion_matrix,
|
|
27
|
-
expected_calibration_error,
|
|
28
|
-
f1,
|
|
29
|
-
fbeta,
|
|
30
|
-
hamming_loss,
|
|
31
|
-
jaccard,
|
|
32
|
-
log_loss,
|
|
33
|
-
mcc,
|
|
34
|
-
npv,
|
|
35
|
-
pr_curve,
|
|
36
|
-
precision,
|
|
37
|
-
recall,
|
|
38
|
-
roc_auc,
|
|
39
|
-
roc_curve,
|
|
40
|
-
specificity,
|
|
41
|
-
top_k_accuracy,
|
|
42
|
-
)
|
|
43
|
-
from .clinical import (
|
|
44
|
-
DecisionCurve,
|
|
45
|
-
DiagnosticReport,
|
|
46
|
-
decision_curve,
|
|
47
|
-
diagnostic_odds_ratio,
|
|
48
|
-
diagnostic_report,
|
|
49
|
-
lr_negative,
|
|
50
|
-
lr_positive,
|
|
51
|
-
net_benefit,
|
|
52
|
-
ppv,
|
|
53
|
-
sensitivity,
|
|
54
|
-
youden_j,
|
|
55
|
-
)
|
|
56
|
-
from .core.exceptions import (
|
|
57
|
-
EvalSuiteError,
|
|
58
|
-
InputValidationError,
|
|
59
|
-
MetricInputError,
|
|
60
|
-
OptionalDependencyError,
|
|
61
|
-
StatisticalTestError,
|
|
62
|
-
UndefinedMetricWarning,
|
|
63
|
-
UnsupportedTaskError,
|
|
64
|
-
)
|
|
65
|
-
from .core.registry import MetricInfo, list_metrics, metric_info
|
|
66
|
-
from .core.result import EvaluationResult, MetricResult
|
|
67
|
-
from .harness import Leaderboard, leaderboard
|
|
68
|
-
from .llmsys import * # noqa: F403 (v0.5.0 LLM-systems functions, listed in llmsys.__all__)
|
|
69
|
-
from .llmsys import __all__ as _llmsys_all
|
|
70
|
-
from .monitor import Alert, Monitor, ks_drift, population_stability_index
|
|
71
|
-
from .regression import (
|
|
72
|
-
adjusted_r2,
|
|
73
|
-
explained_variance,
|
|
74
|
-
huber_loss,
|
|
75
|
-
mae,
|
|
76
|
-
mape,
|
|
77
|
-
max_error,
|
|
78
|
-
mean_bias_error,
|
|
79
|
-
median_absolute_error,
|
|
80
|
-
mse,
|
|
81
|
-
msle,
|
|
82
|
-
quantile_loss,
|
|
83
|
-
r2,
|
|
84
|
-
rae,
|
|
85
|
-
rmse,
|
|
86
|
-
rmsle,
|
|
87
|
-
rse,
|
|
88
|
-
smape,
|
|
89
|
-
)
|
|
90
|
-
from .reporting import ClassificationReport, classification_report
|
|
91
|
-
from .stats import (
|
|
92
|
-
ComparisonResult,
|
|
93
|
-
ConfidenceInterval,
|
|
94
|
-
TestResult,
|
|
95
|
-
accuracy_ci,
|
|
96
|
-
adjust_pvalues,
|
|
97
|
-
bootstrap_ci,
|
|
98
|
-
chi_square_test,
|
|
99
|
-
cliffs_delta,
|
|
100
|
-
cohens_d,
|
|
101
|
-
compare,
|
|
102
|
-
cramers_v,
|
|
103
|
-
delong_test,
|
|
104
|
-
fisher_exact_test,
|
|
105
|
-
friedman_test,
|
|
106
|
-
hedges_g,
|
|
107
|
-
kruskal_wallis_test,
|
|
108
|
-
mann_whitney_test,
|
|
109
|
-
mcnemar_test,
|
|
110
|
-
paired_bootstrap_test,
|
|
111
|
-
paired_t_test,
|
|
112
|
-
proportion_ci,
|
|
113
|
-
roc_auc_ci,
|
|
114
|
-
shapiro_wilk_test,
|
|
115
|
-
t_test,
|
|
116
|
-
wilcoxon_test,
|
|
117
|
-
)
|
|
118
|
-
from .text import * # noqa: F403 (every LLM-evaluation function, listed in text.__all__)
|
|
119
|
-
from .text import __all__ as _text_all
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import contextlib as _contextlib
|
|
14
|
+
import importlib as _importlib
|
|
15
|
+
import sys as _sys
|
|
16
|
+
import types as _types
|
|
17
|
+
from typing import TYPE_CHECKING, Any
|
|
18
|
+
|
|
120
19
|
from .version import __version__
|
|
121
|
-
from .vision import (
|
|
122
|
-
DetectionReport,
|
|
123
|
-
SegmentationReport,
|
|
124
|
-
average_precision_detection,
|
|
125
|
-
average_surface_distance,
|
|
126
|
-
boundary_iou,
|
|
127
|
-
box_iou,
|
|
128
|
-
detection_pr_curve,
|
|
129
|
-
detection_report,
|
|
130
|
-
dice,
|
|
131
|
-
from_coco,
|
|
132
|
-
hausdorff_distance,
|
|
133
|
-
iou,
|
|
134
|
-
mean_average_precision,
|
|
135
|
-
mean_pixel_accuracy,
|
|
136
|
-
miou,
|
|
137
|
-
per_image_scores,
|
|
138
|
-
pixel_accuracy,
|
|
139
|
-
segmentation_confusion,
|
|
140
|
-
segmentation_report,
|
|
141
|
-
)
|
|
142
20
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
21
|
+
if TYPE_CHECKING: # static analysers and IDEs see the full eager API
|
|
22
|
+
from . import (
|
|
23
|
+
calibration,
|
|
24
|
+
classification,
|
|
25
|
+
clinical,
|
|
26
|
+
llmsys,
|
|
27
|
+
plot,
|
|
28
|
+
regression,
|
|
29
|
+
stats,
|
|
30
|
+
text,
|
|
31
|
+
vision,
|
|
32
|
+
)
|
|
33
|
+
from .api import (
|
|
34
|
+
evaluate,
|
|
35
|
+
)
|
|
36
|
+
from .calibration import (
|
|
37
|
+
CalibrationReport,
|
|
38
|
+
calibration_intercept,
|
|
39
|
+
calibration_report,
|
|
40
|
+
calibration_slope,
|
|
41
|
+
hosmer_lemeshow,
|
|
42
|
+
maximum_calibration_error,
|
|
43
|
+
)
|
|
44
|
+
from .cards import (
|
|
45
|
+
ReportCard,
|
|
46
|
+
report_card,
|
|
47
|
+
)
|
|
48
|
+
from .classification import (
|
|
49
|
+
accuracy,
|
|
50
|
+
average_precision,
|
|
51
|
+
balanced_accuracy,
|
|
52
|
+
brier_score,
|
|
53
|
+
calibration_curve,
|
|
54
|
+
cohen_kappa,
|
|
55
|
+
confusion_matrix,
|
|
56
|
+
expected_calibration_error,
|
|
57
|
+
f1,
|
|
58
|
+
fbeta,
|
|
59
|
+
hamming_loss,
|
|
60
|
+
jaccard,
|
|
61
|
+
log_loss,
|
|
62
|
+
mcc,
|
|
63
|
+
npv,
|
|
64
|
+
pr_curve,
|
|
65
|
+
precision,
|
|
66
|
+
recall,
|
|
67
|
+
roc_auc,
|
|
68
|
+
roc_curve,
|
|
69
|
+
specificity,
|
|
70
|
+
top_k_accuracy,
|
|
71
|
+
)
|
|
72
|
+
from .clinical import (
|
|
73
|
+
DecisionCurve,
|
|
74
|
+
DiagnosticReport,
|
|
75
|
+
decision_curve,
|
|
76
|
+
diagnostic_odds_ratio,
|
|
77
|
+
diagnostic_report,
|
|
78
|
+
lr_negative,
|
|
79
|
+
lr_positive,
|
|
80
|
+
net_benefit,
|
|
81
|
+
ppv,
|
|
82
|
+
sensitivity,
|
|
83
|
+
youden_j,
|
|
84
|
+
)
|
|
85
|
+
from .core.exceptions import (
|
|
86
|
+
EvalSuiteError,
|
|
87
|
+
InputValidationError,
|
|
88
|
+
MetricInputError,
|
|
89
|
+
OptionalDependencyError,
|
|
90
|
+
StatisticalTestError,
|
|
91
|
+
UndefinedMetricWarning,
|
|
92
|
+
UnsupportedTaskError,
|
|
93
|
+
)
|
|
94
|
+
from .core.registry import (
|
|
95
|
+
MetricInfo,
|
|
96
|
+
list_metrics,
|
|
97
|
+
metric_info,
|
|
98
|
+
)
|
|
99
|
+
from .core.result import (
|
|
100
|
+
EvaluationResult,
|
|
101
|
+
MetricResult,
|
|
102
|
+
)
|
|
103
|
+
from .fairness import (
|
|
104
|
+
FairnessReport,
|
|
105
|
+
fairness_report,
|
|
106
|
+
)
|
|
107
|
+
from .harness import (
|
|
108
|
+
Leaderboard,
|
|
109
|
+
leaderboard,
|
|
110
|
+
)
|
|
111
|
+
from .html_report import (
|
|
112
|
+
html_report,
|
|
113
|
+
)
|
|
114
|
+
from .judging import (
|
|
115
|
+
JudgeReport,
|
|
116
|
+
RubricReport,
|
|
117
|
+
judge_report,
|
|
118
|
+
rubric_report,
|
|
119
|
+
)
|
|
120
|
+
from .llm_benchmarks import (
|
|
121
|
+
BENCHMARKS,
|
|
122
|
+
format_multiple_choice,
|
|
123
|
+
load_benchmark,
|
|
124
|
+
)
|
|
125
|
+
from .llmsys import *
|
|
126
|
+
from .monitor import (
|
|
127
|
+
Alert,
|
|
128
|
+
Monitor,
|
|
129
|
+
ks_drift,
|
|
130
|
+
population_stability_index,
|
|
131
|
+
)
|
|
132
|
+
from .rag_report import (
|
|
133
|
+
RAGReport,
|
|
134
|
+
rag_report,
|
|
135
|
+
)
|
|
136
|
+
from .regression import (
|
|
137
|
+
adjusted_r2,
|
|
138
|
+
explained_variance,
|
|
139
|
+
huber_loss,
|
|
140
|
+
mae,
|
|
141
|
+
mape,
|
|
142
|
+
max_error,
|
|
143
|
+
mean_bias_error,
|
|
144
|
+
median_absolute_error,
|
|
145
|
+
mse,
|
|
146
|
+
msle,
|
|
147
|
+
quantile_loss,
|
|
148
|
+
r2,
|
|
149
|
+
rae,
|
|
150
|
+
rmse,
|
|
151
|
+
rmsle,
|
|
152
|
+
rse,
|
|
153
|
+
smape,
|
|
154
|
+
)
|
|
155
|
+
from .reporting import (
|
|
156
|
+
ClassificationReport,
|
|
157
|
+
classification_report,
|
|
158
|
+
)
|
|
159
|
+
from .stats import (
|
|
160
|
+
ComparisonResult,
|
|
161
|
+
ConfidenceInterval,
|
|
162
|
+
TestResult,
|
|
163
|
+
accuracy_ci,
|
|
164
|
+
adjust_pvalues,
|
|
165
|
+
bootstrap_ci,
|
|
166
|
+
chi_square_test,
|
|
167
|
+
cliffs_delta,
|
|
168
|
+
cohens_d,
|
|
169
|
+
compare,
|
|
170
|
+
cramers_v,
|
|
171
|
+
delong_test,
|
|
172
|
+
fisher_exact_test,
|
|
173
|
+
friedman_test,
|
|
174
|
+
hedges_g,
|
|
175
|
+
kruskal_wallis_test,
|
|
176
|
+
mann_whitney_test,
|
|
177
|
+
mcnemar_test,
|
|
178
|
+
paired_bootstrap_test,
|
|
179
|
+
paired_t_test,
|
|
180
|
+
proportion_ci,
|
|
181
|
+
roc_auc_ci,
|
|
182
|
+
shapiro_wilk_test,
|
|
183
|
+
t_test,
|
|
184
|
+
wilcoxon_test,
|
|
185
|
+
)
|
|
186
|
+
from .stats.planning import (
|
|
187
|
+
SampleSize,
|
|
188
|
+
power_auc,
|
|
189
|
+
power_mean_difference,
|
|
190
|
+
power_two_proportions,
|
|
191
|
+
sample_size_auc,
|
|
192
|
+
sample_size_mean_difference,
|
|
193
|
+
sample_size_proportion,
|
|
194
|
+
sample_size_two_proportions,
|
|
195
|
+
)
|
|
196
|
+
from .survival import (
|
|
197
|
+
brier_score_survival,
|
|
198
|
+
concordance_index,
|
|
199
|
+
integrated_brier_score,
|
|
200
|
+
kaplan_meier,
|
|
201
|
+
time_dependent_auc,
|
|
202
|
+
)
|
|
203
|
+
from .text import *
|
|
204
|
+
from .vision import (
|
|
205
|
+
DetectionReport,
|
|
206
|
+
SegmentationReport,
|
|
207
|
+
average_precision_detection,
|
|
208
|
+
average_surface_distance,
|
|
209
|
+
boundary_iou,
|
|
210
|
+
box_iou,
|
|
211
|
+
detection_pr_curve,
|
|
212
|
+
detection_report,
|
|
213
|
+
dice,
|
|
214
|
+
from_coco,
|
|
215
|
+
hausdorff_distance,
|
|
216
|
+
iou,
|
|
217
|
+
mean_average_precision,
|
|
218
|
+
mean_pixel_accuracy,
|
|
219
|
+
miou,
|
|
220
|
+
per_image_scores,
|
|
221
|
+
pixel_accuracy,
|
|
222
|
+
segmentation_confusion,
|
|
223
|
+
segmentation_report,
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
# Submodules available as attributes (``es.stats``, ``es.plot``, ...).
|
|
227
|
+
_SUBMODULES = (
|
|
168
228
|
"calibration",
|
|
229
|
+
"classification",
|
|
169
230
|
"clinical",
|
|
170
|
-
"
|
|
171
|
-
"calibration_slope",
|
|
172
|
-
"hosmer_lemeshow",
|
|
173
|
-
"maximum_calibration_error",
|
|
174
|
-
"DecisionCurve",
|
|
175
|
-
"DiagnosticReport",
|
|
176
|
-
"decision_curve",
|
|
177
|
-
"diagnostic_odds_ratio",
|
|
178
|
-
"diagnostic_report",
|
|
179
|
-
"lr_negative",
|
|
180
|
-
"lr_positive",
|
|
181
|
-
"net_benefit",
|
|
182
|
-
"ppv",
|
|
183
|
-
"sensitivity",
|
|
184
|
-
"youden_j",
|
|
185
|
-
"chi_square_test",
|
|
186
|
-
"cramers_v",
|
|
187
|
-
"fisher_exact_test",
|
|
188
|
-
"friedman_test",
|
|
189
|
-
"kruskal_wallis_test",
|
|
190
|
-
"mann_whitney_test",
|
|
191
|
-
"paired_t_test",
|
|
192
|
-
"shapiro_wilk_test",
|
|
193
|
-
"t_test",
|
|
194
|
-
"wilcoxon_test",
|
|
231
|
+
"llmsys",
|
|
195
232
|
"plot",
|
|
196
|
-
"
|
|
197
|
-
"calibration_curve",
|
|
198
|
-
"classification_report",
|
|
199
|
-
"ClassificationReport",
|
|
233
|
+
"regression",
|
|
200
234
|
"stats",
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
"
|
|
235
|
+
"text",
|
|
236
|
+
"vision",
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
# Public name -> the submodule that defines it.
|
|
240
|
+
_EXPORTS: dict[str, tuple[str, ...]] = {
|
|
241
|
+
".api": ("evaluate",),
|
|
242
|
+
".calibration": (
|
|
243
|
+
"CalibrationReport",
|
|
244
|
+
"calibration_intercept",
|
|
245
|
+
"calibration_report",
|
|
246
|
+
"calibration_slope",
|
|
247
|
+
"hosmer_lemeshow",
|
|
248
|
+
"maximum_calibration_error",
|
|
249
|
+
),
|
|
250
|
+
".cards": (
|
|
251
|
+
"ReportCard",
|
|
252
|
+
"report_card",
|
|
253
|
+
),
|
|
254
|
+
".classification": (
|
|
255
|
+
"accuracy",
|
|
256
|
+
"average_precision",
|
|
257
|
+
"balanced_accuracy",
|
|
258
|
+
"brier_score",
|
|
259
|
+
"calibration_curve",
|
|
260
|
+
"cohen_kappa",
|
|
261
|
+
"confusion_matrix",
|
|
262
|
+
"expected_calibration_error",
|
|
263
|
+
"f1",
|
|
264
|
+
"fbeta",
|
|
265
|
+
"hamming_loss",
|
|
266
|
+
"jaccard",
|
|
267
|
+
"log_loss",
|
|
268
|
+
"mcc",
|
|
269
|
+
"npv",
|
|
270
|
+
"pr_curve",
|
|
271
|
+
"precision",
|
|
272
|
+
"recall",
|
|
273
|
+
"roc_auc",
|
|
274
|
+
"roc_curve",
|
|
275
|
+
"specificity",
|
|
276
|
+
"top_k_accuracy",
|
|
277
|
+
),
|
|
278
|
+
".clinical": (
|
|
279
|
+
"DecisionCurve",
|
|
280
|
+
"DiagnosticReport",
|
|
281
|
+
"decision_curve",
|
|
282
|
+
"diagnostic_odds_ratio",
|
|
283
|
+
"diagnostic_report",
|
|
284
|
+
"lr_negative",
|
|
285
|
+
"lr_positive",
|
|
286
|
+
"net_benefit",
|
|
287
|
+
"ppv",
|
|
288
|
+
"sensitivity",
|
|
289
|
+
"youden_j",
|
|
290
|
+
),
|
|
291
|
+
".core.exceptions": (
|
|
292
|
+
"EvalSuiteError",
|
|
293
|
+
"InputValidationError",
|
|
294
|
+
"MetricInputError",
|
|
295
|
+
"OptionalDependencyError",
|
|
296
|
+
"StatisticalTestError",
|
|
297
|
+
"UndefinedMetricWarning",
|
|
298
|
+
"UnsupportedTaskError",
|
|
299
|
+
),
|
|
300
|
+
".core.registry": (
|
|
301
|
+
"MetricInfo",
|
|
302
|
+
"list_metrics",
|
|
303
|
+
"metric_info",
|
|
304
|
+
),
|
|
305
|
+
".core.result": (
|
|
306
|
+
"EvaluationResult",
|
|
307
|
+
"MetricResult",
|
|
308
|
+
),
|
|
309
|
+
".fairness": (
|
|
310
|
+
"FairnessReport",
|
|
311
|
+
"fairness_report",
|
|
312
|
+
),
|
|
313
|
+
".harness": (
|
|
314
|
+
"Leaderboard",
|
|
315
|
+
"leaderboard",
|
|
316
|
+
),
|
|
317
|
+
".html_report": ("html_report",),
|
|
318
|
+
".judging": (
|
|
319
|
+
"JudgeReport",
|
|
320
|
+
"RubricReport",
|
|
321
|
+
"judge_report",
|
|
322
|
+
"rubric_report",
|
|
323
|
+
),
|
|
324
|
+
".llm_benchmarks": (
|
|
325
|
+
"BENCHMARKS",
|
|
326
|
+
"format_multiple_choice",
|
|
327
|
+
"load_benchmark",
|
|
328
|
+
),
|
|
329
|
+
".llmsys": (
|
|
330
|
+
"PII_PATTERNS",
|
|
331
|
+
"PYTHON_KEYWORDS",
|
|
332
|
+
"adaptive_calibration_error",
|
|
333
|
+
"add_typos",
|
|
334
|
+
"adversarial_robustness",
|
|
335
|
+
"agent_cost_per_task",
|
|
336
|
+
"attack_success_rate",
|
|
337
|
+
"aurc",
|
|
338
|
+
"availability",
|
|
339
|
+
"bitext_mining_accuracy",
|
|
340
|
+
"citation_coverage",
|
|
341
|
+
"code_complexity",
|
|
342
|
+
"code_switching_robustness",
|
|
343
|
+
"codebleu",
|
|
344
|
+
"compression_ratio",
|
|
345
|
+
"confidence_accuracy_correlation",
|
|
346
|
+
"context_utilization",
|
|
347
|
+
"contradiction_rate",
|
|
348
|
+
"coverage_at_risk",
|
|
349
|
+
"coverage_rate",
|
|
350
|
+
"cross_document_consistency",
|
|
351
|
+
"cross_lingual_consistency",
|
|
352
|
+
"cultural_appropriateness",
|
|
353
|
+
"detect_pii",
|
|
354
|
+
"direct_assessment",
|
|
355
|
+
"distribution_shift_drop",
|
|
356
|
+
"energy_per_request",
|
|
357
|
+
"error_rate",
|
|
358
|
+
"execution_success_rate",
|
|
359
|
+
"exposure",
|
|
360
|
+
"harmful_response_rate",
|
|
361
|
+
"human_intervention_rate",
|
|
362
|
+
"inference_cost",
|
|
363
|
+
"invalid_tool_call_rate",
|
|
364
|
+
"invariance_violation_rate",
|
|
365
|
+
"language_consistency",
|
|
366
|
+
"language_id_accuracy",
|
|
367
|
+
"language_parity",
|
|
368
|
+
"latency_percentiles",
|
|
369
|
+
"lost_in_the_middle",
|
|
370
|
+
"needle_in_haystack",
|
|
371
|
+
"noise_robustness",
|
|
372
|
+
"ood_accuracy",
|
|
373
|
+
"over_refusal_rate",
|
|
374
|
+
"paraphrase_consistency",
|
|
375
|
+
"patch_acceptance_rate",
|
|
376
|
+
"pii_leakage_rate",
|
|
377
|
+
"plan_adherence",
|
|
378
|
+
"policy_violation_rate",
|
|
379
|
+
"position_accuracy",
|
|
380
|
+
"prompt_sensitivity",
|
|
381
|
+
"recovery_success_rate",
|
|
382
|
+
"red_team_success_rate",
|
|
383
|
+
"refusal_rate",
|
|
384
|
+
"requests_per_second",
|
|
385
|
+
"resolved_rate",
|
|
386
|
+
"resource_utilization",
|
|
387
|
+
"response_stability",
|
|
388
|
+
"retrieval_accuracy_by_length",
|
|
389
|
+
"risk_at_coverage",
|
|
390
|
+
"risk_coverage_curve",
|
|
391
|
+
"runtime_efficiency",
|
|
392
|
+
"security_vulnerability_rate",
|
|
393
|
+
"selective_risk",
|
|
394
|
+
"state_tracking_accuracy",
|
|
395
|
+
"static_analysis_violation_rate",
|
|
396
|
+
"steps_per_task",
|
|
397
|
+
"stereotype_preference",
|
|
398
|
+
"summary_coverage",
|
|
399
|
+
"syntax_validity_rate",
|
|
400
|
+
"task_completion_rate",
|
|
401
|
+
"throughput",
|
|
402
|
+
"time_per_output_token",
|
|
403
|
+
"time_to_first_token",
|
|
404
|
+
"token_usage",
|
|
405
|
+
"tool_failure_recovery_rate",
|
|
406
|
+
"tool_use_efficiency",
|
|
407
|
+
"toxicity_score",
|
|
408
|
+
"truncation_sensitivity",
|
|
409
|
+
"unit_test_pass_rate",
|
|
410
|
+
"unnecessary_tool_call_rate",
|
|
411
|
+
"weat_effect_size",
|
|
412
|
+
),
|
|
413
|
+
".monitor": (
|
|
414
|
+
"Alert",
|
|
415
|
+
"Monitor",
|
|
416
|
+
"ks_drift",
|
|
417
|
+
"population_stability_index",
|
|
418
|
+
),
|
|
419
|
+
".rag_report": (
|
|
420
|
+
"RAGReport",
|
|
421
|
+
"rag_report",
|
|
422
|
+
),
|
|
423
|
+
".regression": (
|
|
424
|
+
"adjusted_r2",
|
|
425
|
+
"explained_variance",
|
|
426
|
+
"huber_loss",
|
|
427
|
+
"mae",
|
|
428
|
+
"mape",
|
|
429
|
+
"max_error",
|
|
430
|
+
"mean_bias_error",
|
|
431
|
+
"median_absolute_error",
|
|
432
|
+
"mse",
|
|
433
|
+
"msle",
|
|
434
|
+
"quantile_loss",
|
|
435
|
+
"r2",
|
|
436
|
+
"rae",
|
|
437
|
+
"rmse",
|
|
438
|
+
"rmsle",
|
|
439
|
+
"rse",
|
|
440
|
+
"smape",
|
|
441
|
+
),
|
|
442
|
+
".reporting": (
|
|
443
|
+
"ClassificationReport",
|
|
444
|
+
"classification_report",
|
|
445
|
+
),
|
|
446
|
+
".stats": (
|
|
447
|
+
"ComparisonResult",
|
|
448
|
+
"ConfidenceInterval",
|
|
449
|
+
"TestResult",
|
|
450
|
+
"accuracy_ci",
|
|
451
|
+
"adjust_pvalues",
|
|
452
|
+
"bootstrap_ci",
|
|
453
|
+
"chi_square_test",
|
|
454
|
+
"cliffs_delta",
|
|
455
|
+
"cohens_d",
|
|
456
|
+
"compare",
|
|
457
|
+
"cramers_v",
|
|
458
|
+
"delong_test",
|
|
459
|
+
"fisher_exact_test",
|
|
460
|
+
"friedman_test",
|
|
461
|
+
"hedges_g",
|
|
462
|
+
"kruskal_wallis_test",
|
|
463
|
+
"mann_whitney_test",
|
|
464
|
+
"mcnemar_test",
|
|
465
|
+
"paired_bootstrap_test",
|
|
466
|
+
"paired_t_test",
|
|
467
|
+
"proportion_ci",
|
|
468
|
+
"roc_auc_ci",
|
|
469
|
+
"shapiro_wilk_test",
|
|
470
|
+
"t_test",
|
|
471
|
+
"wilcoxon_test",
|
|
472
|
+
),
|
|
473
|
+
".stats.planning": (
|
|
474
|
+
"SampleSize",
|
|
475
|
+
"power_auc",
|
|
476
|
+
"power_mean_difference",
|
|
477
|
+
"power_two_proportions",
|
|
478
|
+
"sample_size_auc",
|
|
479
|
+
"sample_size_mean_difference",
|
|
480
|
+
"sample_size_proportion",
|
|
481
|
+
"sample_size_two_proportions",
|
|
482
|
+
),
|
|
483
|
+
".survival": (
|
|
484
|
+
"brier_score_survival",
|
|
485
|
+
"concordance_index",
|
|
486
|
+
"integrated_brier_score",
|
|
487
|
+
"kaplan_meier",
|
|
488
|
+
"time_dependent_auc",
|
|
489
|
+
),
|
|
490
|
+
".text": (
|
|
491
|
+
"TextReport",
|
|
492
|
+
"abstention_accuracy",
|
|
493
|
+
"answer_correctness",
|
|
494
|
+
"answer_relevance",
|
|
495
|
+
"api_call_success_rate",
|
|
496
|
+
"benchmark_accuracy",
|
|
497
|
+
"bertscore",
|
|
498
|
+
"bleu",
|
|
499
|
+
"bradley_terry",
|
|
500
|
+
"chrf",
|
|
501
|
+
"cider",
|
|
502
|
+
"citation_precision",
|
|
503
|
+
"citation_recall",
|
|
504
|
+
"claim_verification_accuracy",
|
|
505
|
+
"constraint_satisfaction_rate",
|
|
506
|
+
"context_precision",
|
|
507
|
+
"context_recall",
|
|
508
|
+
"context_relevance",
|
|
509
|
+
"cross_entropy",
|
|
510
|
+
"distinct_n",
|
|
511
|
+
"elo_ratings",
|
|
512
|
+
"embedding_similarity",
|
|
513
|
+
"exact_match",
|
|
514
|
+
"extra_content_rate",
|
|
515
|
+
"extract_answer",
|
|
516
|
+
"extract_json",
|
|
517
|
+
"failure_attribution",
|
|
518
|
+
"faithfulness",
|
|
519
|
+
"fleiss_kappa",
|
|
520
|
+
"format_compliance",
|
|
521
|
+
"groundedness",
|
|
522
|
+
"hallucination_rate",
|
|
523
|
+
"hit_rate_at_k",
|
|
524
|
+
"instruction_compliance_rate",
|
|
525
|
+
"instruction_retention",
|
|
526
|
+
"json_schema_compliance",
|
|
527
|
+
"json_validity",
|
|
528
|
+
"judge_agreement",
|
|
529
|
+
"knowledge_consistency",
|
|
530
|
+
"krippendorff_alpha",
|
|
531
|
+
"latency_summary",
|
|
532
|
+
"majority_vote_accuracy",
|
|
533
|
+
"mauve",
|
|
534
|
+
"mean_average_precision_at_k",
|
|
535
|
+
"meteor",
|
|
536
|
+
"model_score",
|
|
537
|
+
"moverscore",
|
|
538
|
+
"mrr",
|
|
539
|
+
"ndcg_at_k",
|
|
540
|
+
"normalize_answer",
|
|
541
|
+
"pass_at_k",
|
|
542
|
+
"perplexity",
|
|
543
|
+
"position_consistency",
|
|
544
|
+
"precision_at_k",
|
|
545
|
+
"recall_at_k",
|
|
546
|
+
"required_field_accuracy",
|
|
547
|
+
"rouge_1",
|
|
548
|
+
"rouge_2",
|
|
549
|
+
"rouge_l",
|
|
550
|
+
"rouge_lsum",
|
|
551
|
+
"rubric_score",
|
|
552
|
+
"self_bleu",
|
|
553
|
+
"self_preference_bias",
|
|
554
|
+
"sentence_bleu",
|
|
555
|
+
"spice",
|
|
556
|
+
"task_success_rate",
|
|
557
|
+
"ter",
|
|
558
|
+
"text_report",
|
|
559
|
+
"token_f1",
|
|
560
|
+
"tool_argument_accuracy",
|
|
561
|
+
"tool_call_f1",
|
|
562
|
+
"tool_selection_accuracy",
|
|
563
|
+
"validate_json_schema",
|
|
564
|
+
"verbosity_bias",
|
|
565
|
+
"win_rate",
|
|
566
|
+
"xml_validity",
|
|
567
|
+
),
|
|
568
|
+
".vision": (
|
|
569
|
+
"DetectionReport",
|
|
570
|
+
"SegmentationReport",
|
|
571
|
+
"average_precision_detection",
|
|
572
|
+
"average_surface_distance",
|
|
573
|
+
"boundary_iou",
|
|
574
|
+
"box_iou",
|
|
575
|
+
"detection_pr_curve",
|
|
576
|
+
"detection_report",
|
|
577
|
+
"dice",
|
|
578
|
+
"from_coco",
|
|
579
|
+
"hausdorff_distance",
|
|
580
|
+
"iou",
|
|
581
|
+
"mean_average_precision",
|
|
582
|
+
"mean_pixel_accuracy",
|
|
583
|
+
"miou",
|
|
584
|
+
"per_image_scores",
|
|
585
|
+
"pixel_accuracy",
|
|
586
|
+
"segmentation_confusion",
|
|
587
|
+
"segmentation_report",
|
|
588
|
+
),
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
_LAZY: dict[str, str] = {name: mod for mod, names in _EXPORTS.items() for name in names}
|
|
592
|
+
_LAZY.update({"UpdateInfo": "._update", "check_for_update": "._update", "upgrade": "._update"})
|
|
593
|
+
|
|
594
|
+
__all__ = [
|
|
595
|
+
"Alert",
|
|
596
|
+
"BENCHMARKS",
|
|
597
|
+
"CalibrationReport",
|
|
598
|
+
"ClassificationReport",
|
|
217
599
|
"ComparisonResult",
|
|
600
|
+
"ConfidenceInterval",
|
|
601
|
+
"DecisionCurve",
|
|
602
|
+
"DetectionReport",
|
|
603
|
+
"DiagnosticReport",
|
|
218
604
|
"EvalSuiteError",
|
|
219
605
|
"EvaluationResult",
|
|
606
|
+
"FairnessReport",
|
|
220
607
|
"InputValidationError",
|
|
608
|
+
"JudgeReport",
|
|
609
|
+
"Leaderboard",
|
|
221
610
|
"MetricInfo",
|
|
222
611
|
"MetricInputError",
|
|
223
612
|
"MetricResult",
|
|
613
|
+
"Monitor",
|
|
224
614
|
"OptionalDependencyError",
|
|
615
|
+
"PII_PATTERNS",
|
|
616
|
+
"PYTHON_KEYWORDS",
|
|
617
|
+
"RAGReport",
|
|
618
|
+
"ReportCard",
|
|
619
|
+
"RubricReport",
|
|
620
|
+
"SampleSize",
|
|
621
|
+
"SegmentationReport",
|
|
225
622
|
"StatisticalTestError",
|
|
623
|
+
"TestResult",
|
|
624
|
+
"TextReport",
|
|
226
625
|
"UndefinedMetricWarning",
|
|
227
626
|
"UnsupportedTaskError",
|
|
627
|
+
"UpdateInfo",
|
|
228
628
|
"__version__",
|
|
629
|
+
"abstention_accuracy",
|
|
229
630
|
"accuracy",
|
|
631
|
+
"accuracy_ci",
|
|
632
|
+
"adaptive_calibration_error",
|
|
633
|
+
"add_typos",
|
|
634
|
+
"adjust_pvalues",
|
|
230
635
|
"adjusted_r2",
|
|
636
|
+
"adversarial_robustness",
|
|
637
|
+
"agent_cost_per_task",
|
|
638
|
+
"answer_correctness",
|
|
639
|
+
"answer_relevance",
|
|
640
|
+
"api_call_success_rate",
|
|
641
|
+
"attack_success_rate",
|
|
642
|
+
"aurc",
|
|
643
|
+
"availability",
|
|
231
644
|
"average_precision",
|
|
645
|
+
"average_precision_detection",
|
|
646
|
+
"average_surface_distance",
|
|
232
647
|
"balanced_accuracy",
|
|
648
|
+
"benchmark_accuracy",
|
|
649
|
+
"bertscore",
|
|
650
|
+
"bitext_mining_accuracy",
|
|
651
|
+
"bleu",
|
|
652
|
+
"bootstrap_ci",
|
|
653
|
+
"boundary_iou",
|
|
654
|
+
"box_iou",
|
|
655
|
+
"bradley_terry",
|
|
233
656
|
"brier_score",
|
|
657
|
+
"brier_score_survival",
|
|
658
|
+
"calibration",
|
|
659
|
+
"calibration_curve",
|
|
660
|
+
"calibration_intercept",
|
|
661
|
+
"calibration_report",
|
|
662
|
+
"calibration_slope",
|
|
663
|
+
"check_for_update",
|
|
664
|
+
"chi_square_test",
|
|
665
|
+
"chrf",
|
|
666
|
+
"cider",
|
|
667
|
+
"citation_coverage",
|
|
668
|
+
"citation_precision",
|
|
669
|
+
"citation_recall",
|
|
670
|
+
"claim_verification_accuracy",
|
|
234
671
|
"classification",
|
|
672
|
+
"classification_report",
|
|
673
|
+
"cliffs_delta",
|
|
674
|
+
"clinical",
|
|
675
|
+
"code_complexity",
|
|
676
|
+
"code_switching_robustness",
|
|
677
|
+
"codebleu",
|
|
235
678
|
"cohen_kappa",
|
|
679
|
+
"cohens_d",
|
|
680
|
+
"compare",
|
|
681
|
+
"compression_ratio",
|
|
682
|
+
"concordance_index",
|
|
683
|
+
"confidence_accuracy_correlation",
|
|
236
684
|
"confusion_matrix",
|
|
685
|
+
"constraint_satisfaction_rate",
|
|
686
|
+
"context_precision",
|
|
687
|
+
"context_recall",
|
|
688
|
+
"context_relevance",
|
|
689
|
+
"context_utilization",
|
|
690
|
+
"contradiction_rate",
|
|
691
|
+
"coverage_at_risk",
|
|
692
|
+
"coverage_rate",
|
|
693
|
+
"cramers_v",
|
|
694
|
+
"cross_document_consistency",
|
|
695
|
+
"cross_entropy",
|
|
696
|
+
"cross_lingual_consistency",
|
|
697
|
+
"cultural_appropriateness",
|
|
698
|
+
"decision_curve",
|
|
699
|
+
"delong_test",
|
|
700
|
+
"detect_pii",
|
|
701
|
+
"detection_pr_curve",
|
|
702
|
+
"detection_report",
|
|
703
|
+
"diagnostic_odds_ratio",
|
|
704
|
+
"diagnostic_report",
|
|
705
|
+
"dice",
|
|
706
|
+
"direct_assessment",
|
|
707
|
+
"distinct_n",
|
|
708
|
+
"distribution_shift_drop",
|
|
709
|
+
"elo_ratings",
|
|
710
|
+
"embedding_similarity",
|
|
711
|
+
"energy_per_request",
|
|
712
|
+
"error_rate",
|
|
237
713
|
"evaluate",
|
|
238
|
-
"
|
|
239
|
-
"
|
|
240
|
-
"
|
|
241
|
-
"population_stability_index",
|
|
242
|
-
"ks_drift",
|
|
243
|
-
"Leaderboard",
|
|
714
|
+
"exact_match",
|
|
715
|
+
"execution_success_rate",
|
|
716
|
+
"expected_calibration_error",
|
|
244
717
|
"explained_variance",
|
|
718
|
+
"exposure",
|
|
719
|
+
"extra_content_rate",
|
|
720
|
+
"extract_answer",
|
|
721
|
+
"extract_json",
|
|
245
722
|
"f1",
|
|
723
|
+
"failure_attribution",
|
|
724
|
+
"fairness_report",
|
|
725
|
+
"faithfulness",
|
|
246
726
|
"fbeta",
|
|
727
|
+
"fisher_exact_test",
|
|
728
|
+
"fleiss_kappa",
|
|
729
|
+
"format_compliance",
|
|
730
|
+
"format_multiple_choice",
|
|
731
|
+
"friedman_test",
|
|
732
|
+
"from_coco",
|
|
733
|
+
"groundedness",
|
|
734
|
+
"hallucination_rate",
|
|
247
735
|
"hamming_loss",
|
|
736
|
+
"harmful_response_rate",
|
|
737
|
+
"hausdorff_distance",
|
|
738
|
+
"hedges_g",
|
|
739
|
+
"hit_rate_at_k",
|
|
740
|
+
"hosmer_lemeshow",
|
|
741
|
+
"html_report",
|
|
248
742
|
"huber_loss",
|
|
743
|
+
"human_intervention_rate",
|
|
744
|
+
"inference_cost",
|
|
745
|
+
"instruction_compliance_rate",
|
|
746
|
+
"instruction_retention",
|
|
747
|
+
"integrated_brier_score",
|
|
748
|
+
"invalid_tool_call_rate",
|
|
749
|
+
"invariance_violation_rate",
|
|
750
|
+
"iou",
|
|
249
751
|
"jaccard",
|
|
752
|
+
"json_schema_compliance",
|
|
753
|
+
"json_validity",
|
|
754
|
+
"judge_agreement",
|
|
755
|
+
"judge_report",
|
|
756
|
+
"kaplan_meier",
|
|
757
|
+
"knowledge_consistency",
|
|
758
|
+
"krippendorff_alpha",
|
|
759
|
+
"kruskal_wallis_test",
|
|
760
|
+
"ks_drift",
|
|
761
|
+
"language_consistency",
|
|
762
|
+
"language_id_accuracy",
|
|
763
|
+
"language_parity",
|
|
764
|
+
"latency_percentiles",
|
|
765
|
+
"latency_summary",
|
|
766
|
+
"leaderboard",
|
|
250
767
|
"list_metrics",
|
|
768
|
+
"llmsys",
|
|
769
|
+
"load_benchmark",
|
|
251
770
|
"log_loss",
|
|
771
|
+
"lost_in_the_middle",
|
|
772
|
+
"lr_negative",
|
|
773
|
+
"lr_positive",
|
|
252
774
|
"mae",
|
|
775
|
+
"majority_vote_accuracy",
|
|
776
|
+
"mann_whitney_test",
|
|
253
777
|
"mape",
|
|
778
|
+
"mauve",
|
|
254
779
|
"max_error",
|
|
780
|
+
"maximum_calibration_error",
|
|
255
781
|
"mcc",
|
|
782
|
+
"mcnemar_test",
|
|
783
|
+
"mean_average_precision",
|
|
784
|
+
"mean_average_precision_at_k",
|
|
256
785
|
"mean_bias_error",
|
|
786
|
+
"mean_pixel_accuracy",
|
|
257
787
|
"median_absolute_error",
|
|
788
|
+
"meteor",
|
|
258
789
|
"metric_info",
|
|
790
|
+
"miou",
|
|
791
|
+
"model_score",
|
|
792
|
+
"moverscore",
|
|
793
|
+
"mrr",
|
|
259
794
|
"mse",
|
|
260
795
|
"msle",
|
|
796
|
+
"ndcg_at_k",
|
|
797
|
+
"needle_in_haystack",
|
|
798
|
+
"net_benefit",
|
|
799
|
+
"noise_robustness",
|
|
800
|
+
"normalize_answer",
|
|
261
801
|
"npv",
|
|
802
|
+
"ood_accuracy",
|
|
803
|
+
"over_refusal_rate",
|
|
804
|
+
"paired_bootstrap_test",
|
|
805
|
+
"paired_t_test",
|
|
806
|
+
"paraphrase_consistency",
|
|
807
|
+
"pass_at_k",
|
|
808
|
+
"patch_acceptance_rate",
|
|
809
|
+
"per_image_scores",
|
|
810
|
+
"perplexity",
|
|
811
|
+
"pii_leakage_rate",
|
|
812
|
+
"pixel_accuracy",
|
|
813
|
+
"plan_adherence",
|
|
814
|
+
"plot",
|
|
815
|
+
"policy_violation_rate",
|
|
816
|
+
"population_stability_index",
|
|
817
|
+
"position_accuracy",
|
|
818
|
+
"position_consistency",
|
|
819
|
+
"power_auc",
|
|
820
|
+
"power_mean_difference",
|
|
821
|
+
"power_two_proportions",
|
|
822
|
+
"ppv",
|
|
262
823
|
"pr_curve",
|
|
263
824
|
"precision",
|
|
825
|
+
"precision_at_k",
|
|
826
|
+
"prompt_sensitivity",
|
|
827
|
+
"proportion_ci",
|
|
264
828
|
"quantile_loss",
|
|
265
829
|
"r2",
|
|
266
830
|
"rae",
|
|
831
|
+
"rag_report",
|
|
267
832
|
"recall",
|
|
833
|
+
"recall_at_k",
|
|
834
|
+
"recovery_success_rate",
|
|
835
|
+
"red_team_success_rate",
|
|
836
|
+
"refusal_rate",
|
|
268
837
|
"regression",
|
|
838
|
+
"report_card",
|
|
839
|
+
"requests_per_second",
|
|
840
|
+
"required_field_accuracy",
|
|
841
|
+
"resolved_rate",
|
|
842
|
+
"resource_utilization",
|
|
843
|
+
"response_stability",
|
|
844
|
+
"retrieval_accuracy_by_length",
|
|
845
|
+
"risk_at_coverage",
|
|
846
|
+
"risk_coverage_curve",
|
|
269
847
|
"rmse",
|
|
270
848
|
"rmsle",
|
|
271
849
|
"roc_auc",
|
|
850
|
+
"roc_auc_ci",
|
|
272
851
|
"roc_curve",
|
|
852
|
+
"rouge_1",
|
|
853
|
+
"rouge_2",
|
|
854
|
+
"rouge_l",
|
|
855
|
+
"rouge_lsum",
|
|
273
856
|
"rse",
|
|
274
|
-
"smape",
|
|
275
|
-
"specificity",
|
|
276
|
-
"top_k_accuracy",
|
|
277
|
-
]
|
|
278
|
-
__all__ += list(_text_all)
|
|
279
|
-
__all__ += list(_llmsys_all)
|
|
280
|
-
|
|
281
|
-
from .fairness import FairnessReport, fairness_report # noqa: E402
|
|
282
|
-
from .html_report import html_report # noqa: E402
|
|
283
|
-
from .judging import JudgeReport, RubricReport, judge_report, rubric_report # noqa: E402
|
|
284
|
-
from .llm_benchmarks import BENCHMARKS, format_multiple_choice, load_benchmark # noqa: E402
|
|
285
|
-
from .rag_report import RAGReport, rag_report # noqa: E402
|
|
286
|
-
from .stats.planning import ( # noqa: E402
|
|
287
|
-
SampleSize,
|
|
288
|
-
power_auc,
|
|
289
|
-
power_mean_difference,
|
|
290
|
-
power_two_proportions,
|
|
291
|
-
sample_size_auc,
|
|
292
|
-
sample_size_mean_difference,
|
|
293
|
-
sample_size_proportion,
|
|
294
|
-
sample_size_two_proportions,
|
|
295
|
-
)
|
|
296
|
-
from .survival import ( # noqa: E402
|
|
297
|
-
brier_score_survival,
|
|
298
|
-
concordance_index,
|
|
299
|
-
integrated_brier_score,
|
|
300
|
-
kaplan_meier,
|
|
301
|
-
time_dependent_auc,
|
|
302
|
-
)
|
|
303
|
-
|
|
304
|
-
__all__ += [
|
|
305
|
-
"BENCHMARKS",
|
|
306
|
-
"FairnessReport",
|
|
307
|
-
"JudgeReport",
|
|
308
|
-
"RAGReport",
|
|
309
|
-
"RubricReport",
|
|
310
|
-
"SampleSize",
|
|
311
|
-
"brier_score_survival",
|
|
312
|
-
"concordance_index",
|
|
313
|
-
"fairness_report",
|
|
314
|
-
"format_multiple_choice",
|
|
315
|
-
"html_report",
|
|
316
|
-
"integrated_brier_score",
|
|
317
|
-
"judge_report",
|
|
318
|
-
"kaplan_meier",
|
|
319
|
-
"load_benchmark",
|
|
320
|
-
"power_auc",
|
|
321
|
-
"power_mean_difference",
|
|
322
|
-
"power_two_proportions",
|
|
323
|
-
"rag_report",
|
|
324
857
|
"rubric_report",
|
|
858
|
+
"rubric_score",
|
|
859
|
+
"runtime_efficiency",
|
|
325
860
|
"sample_size_auc",
|
|
326
861
|
"sample_size_mean_difference",
|
|
327
862
|
"sample_size_proportion",
|
|
328
863
|
"sample_size_two_proportions",
|
|
864
|
+
"security_vulnerability_rate",
|
|
865
|
+
"segmentation_confusion",
|
|
866
|
+
"segmentation_report",
|
|
867
|
+
"selective_risk",
|
|
868
|
+
"self_bleu",
|
|
869
|
+
"self_preference_bias",
|
|
870
|
+
"sensitivity",
|
|
871
|
+
"sentence_bleu",
|
|
872
|
+
"shapiro_wilk_test",
|
|
873
|
+
"smape",
|
|
874
|
+
"specificity",
|
|
875
|
+
"spice",
|
|
876
|
+
"state_tracking_accuracy",
|
|
877
|
+
"static_analysis_violation_rate",
|
|
878
|
+
"stats",
|
|
879
|
+
"steps_per_task",
|
|
880
|
+
"stereotype_preference",
|
|
881
|
+
"summary_coverage",
|
|
882
|
+
"syntax_validity_rate",
|
|
883
|
+
"t_test",
|
|
884
|
+
"task_completion_rate",
|
|
885
|
+
"task_success_rate",
|
|
886
|
+
"ter",
|
|
887
|
+
"text",
|
|
888
|
+
"text_report",
|
|
889
|
+
"throughput",
|
|
329
890
|
"time_dependent_auc",
|
|
891
|
+
"time_per_output_token",
|
|
892
|
+
"time_to_first_token",
|
|
893
|
+
"token_f1",
|
|
894
|
+
"token_usage",
|
|
895
|
+
"tool_argument_accuracy",
|
|
896
|
+
"tool_call_f1",
|
|
897
|
+
"tool_failure_recovery_rate",
|
|
898
|
+
"tool_selection_accuracy",
|
|
899
|
+
"tool_use_efficiency",
|
|
900
|
+
"top_k_accuracy",
|
|
901
|
+
"toxicity_score",
|
|
902
|
+
"truncation_sensitivity",
|
|
903
|
+
"unit_test_pass_rate",
|
|
904
|
+
"unnecessary_tool_call_rate",
|
|
905
|
+
"upgrade",
|
|
906
|
+
"validate_json_schema",
|
|
907
|
+
"verbosity_bias",
|
|
908
|
+
"vision",
|
|
909
|
+
"weat_effect_size",
|
|
910
|
+
"wilcoxon_test",
|
|
911
|
+
"win_rate",
|
|
912
|
+
"xml_validity",
|
|
913
|
+
"youden_j",
|
|
330
914
|
]
|
|
331
915
|
|
|
332
|
-
import contextlib as _contextlib # noqa: E402
|
|
333
916
|
|
|
334
|
-
|
|
917
|
+
def __getattr__(name: str) -> Any:
|
|
918
|
+
if name in _SUBMODULES:
|
|
919
|
+
value = _importlib.import_module(f".{name}", __name__)
|
|
920
|
+
elif name in _LAZY:
|
|
921
|
+
value = getattr(_importlib.import_module(_LAZY[name], __name__), name)
|
|
922
|
+
else:
|
|
923
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
924
|
+
globals()[name] = value # cache: later look-ups are plain attribute access
|
|
925
|
+
return value
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
def __dir__() -> list[str]:
|
|
929
|
+
return sorted(set(globals()) | set(__all__))
|
|
930
|
+
|
|
931
|
+
|
|
932
|
+
class _Package(_types.ModuleType):
|
|
933
|
+
"""Keeps functions that share a name with their module (``rag_report``, ``html_report``) from being replaced
|
|
934
|
+
by the submodule when Python binds a freshly imported submodule to the package."""
|
|
935
|
+
|
|
936
|
+
def __setattr__(self, name: str, value: Any) -> None:
|
|
937
|
+
if name in _LAZY and isinstance(value, _types.ModuleType):
|
|
938
|
+
return # the module stays reachable as sys.modules["evalsuite.<name>"]
|
|
939
|
+
super().__setattr__(name, value)
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
_sys.modules[__name__].__class__ = _Package
|
|
335
943
|
|
|
336
|
-
__all__ += ["UpdateInfo", "check_for_update", "upgrade"]
|
|
337
944
|
|
|
338
945
|
# A cached, once-a-day notice; the PyPI lookup runs in a background thread (see evalsuite._update). It must
|
|
339
946
|
# never affect importing EvalSuite.
|