Repository navigation
Commit 17ed8d5
authored
Resolve metric names in one place
Summary:
Enabling change for the rest of the stack. `calculate_numeric_gap` resolved
"MSE"/"L1"/"SNR" with an if/elif chain inline in its body, so no other caller could
reuse it. Moved to `numerical_comparator` as `comparator_class_for_metric`.
Required because the next diff up wraps the resolved comparator in a decorator, so it
has to resolve the metric name itself. Same names, same behaviour; only the error text
changes.
Differential Revision: D119832728
Pull Request resolved: pytorch#231961 parent 0c1f7a4 commit 17ed8d5
2 files changed
Lines changed: 22 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | | - | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
1647 | 1645 | | |
1648 | 1646 | | |
1649 | 1647 | | |
1650 | | - | |
1651 | | - | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
| 1648 | + | |
1659 | 1649 | | |
1660 | 1650 | | |
1661 | 1651 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
28 | 47 | | |
| 48 | + | |
29 | 49 | | |
30 | 50 | | |
31 | 51 | | |
| |||
0 commit comments