檢查 Perspective 外掛後發現:錯誤回應會令評分變成 0
I checked what my forum does when Perspective returns an error — it scores everything 0
一名 Discourse 論壇管理員檢查 Perspective 外掛程式碼後發現,回應缺少 attributeScores 時,程式會將評分預設為 0.0,而非標記內容或送交審查。連線失敗會顯示錯誤;作者指出不同評分器的分數不可直接比較,需以實際流量重播測試新評分器,才能調整評分門檻。
I run a small Discourse forum with the Perspective plugin, and with the Dec 31 shutdown coming, I finally went and read the plugin code instead of trusting the migration guides.
What I found: when the response has no attributeScores — the shape of an error body — the code rescues to a default of 0.0. Not flagged, not queued for review. Just 0. Connection failures raise a visible error, so that's not the scary path. The error-body path is.
So my question isn't really "which replacement do I switch to." The guides all give mapping tables, but the scores aren't comparable — TOXICITY has no single equivalent on the other side. My thresholds won't survive the move unless I replay my own traffic against the new scorer and see what it actually does with my comments.
Has anyone here actually done that replay — run old and new side by side on real traffic before switching? What did your thresholds end up looking like, and did anything surprise you? Also curious: has anyone checked what their own error handling does today, not just what the guides say?
來源:DEV Community · dev.to