Skip to content

fix cls threhsold not being used - #92

Open
MauroCE wants to merge 1 commit into
fastino-ai:mainfrom
MauroCE:fix-cls-threshold
Open

fix cls threhsold not being used#92
MauroCE wants to merge 1 commit into
fastino-ai:mainfrom
MauroCE:fix-cls-threshold

Conversation

@MauroCE

@MauroCE MauroCE commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #66

cls_threshold was being read but never actually used in single-label classification. The top label was always returned regardless of its score. Also removed the multi-label fallback that had the same problem, where if nothing passed the threshold it would return the best label anyway. Both paths now return None or [] when nothing meets the threshold. Happy to adjust the return values if something different is preferred

@urchade

urchade commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

cls_threshold was being read but never actually used in single-label classification. The top label was always returned regardless of its score.

this was intended, in general single label classification uses argmax decoding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Confidence threshold is not honoured

2 participants