Commit 35e6394
docs(_bert): explain str-key label2id requirement to prevent regression
A future refactor sees `{str(i): i}` as a no-op coercion and "simplifies"
back to `{i: i}`; mypy passes, then BertScorer.fit raises
StrictDataclassFieldValidationError at runtime. Comment makes the WHY
explicit at the call site, matching the WHY-only comment policy from
14f9576.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 5dfc75d commit 35e6394
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
133 | 136 | | |
134 | 137 | | |
135 | 138 | | |
| |||
0 commit comments