Skip to content

Fix issue where OV sentence similarity report NaN metric#310

Merged
zhenchaoni merged 1 commit into
mainfrom
private/zhenni/fix_nan
Apr 10, 2026
Merged

Fix issue where OV sentence similarity report NaN metric#310
zhenchaoni merged 1 commit into
mainfrom
private/zhenni/fix_nan

Conversation

@zhenchaoni
Copy link
Copy Markdown
Member

We use spearman correlation to measure the sentence similar models. The metric calculation library returns a NaN value when the prediction array contains constant values, meaning no sentence similarity rank order.

When the predictions output constant value, this means severe regression as the model completely lose the capability to detect sentence similarity.

Therefore, we treat the metric as zero when the lib returns NaN. 0 means the model has no ranking capability.

@zhenchaoni zhenchaoni requested a review from a team as a code owner April 10, 2026 06:43
@zhenchaoni zhenchaoni merged commit 976a454 into main Apr 10, 2026
9 checks passed
@zhenchaoni zhenchaoni deleted the private/zhenni/fix_nan branch April 10, 2026 07:06
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.

OV sentence similarity reports NaN for sentence-transformers/all-mpnet-base-v2

2 participants