Commit 805c925
committed
fix(module): add EvaluationModuleError to public API and wrap _compute exceptions
Adds EvaluationModuleError exception class to evaluate/module.py and exports
it from evaluate/__init__.py so callers can catch evaluate-specific failures
without catching broad Exception or importing internal sklearn/numpy types.
Wraps the _compute() call in EvaluationModule.compute() so that raw
ValueError/KeyError/etc. from metric backends surface as EvaluationModuleError
instead of leaking implementation details.
Closes #7581 parent a7dd338 commit 805c925
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| |||
464 | 473 | | |
465 | 474 | | |
466 | 475 | | |
467 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
468 | 482 | | |
469 | 483 | | |
470 | 484 | | |
| |||
0 commit comments