Commit e507895
fix: pass PII mapping config to auto-detecting Candle BERT classifier
Critical bug fix for PR #648 CI failures.
**Root Cause:**
The new auto-detecting PII classifier API was not receiving the PII
configuration mapping (pii_type_mapping.json), causing:
- 0% PII detection accuracy (classifier didn't know which entities to detect)
- 0/100 requests blocked (blocking policy received incomplete results)
**The Bug:**
Changed from ClassifyModernBertPIITokens(text, configPath) to
ClassifyCandleBertTokens(text) - dropping the configPath parameter.
**The Fix:**
Use ClassifyCandleBertTokensWithLabels(text, id2labelJSON) to pass
the PII entity mapping configuration to the classifier.
**Testing:**
- Local testing worked because it was using old code (ModernBERT path)
- CI failed because it builds from PR branch (new auto-detect path)
- This fix ensures both LoRA and Traditional paths receive PII config
**Related:**
- Fixes CI test failures in integration-test jobs
- LoRA loading still shows 'hidden_act' error but falls back to ModernBERT
- ModernBERT fallback now works correctly with this fix
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Signed-off-by: Yossi Ovadia <[email protected]>1 parent 1d30270 commit e507895
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
186 | 192 | | |
187 | 193 | | |
188 | 194 | | |
| |||
0 commit comments