-
Notifications
You must be signed in to change notification settings - Fork 179
normalize score to make sure it is always in the range of [0,1] #1236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
normalize score to make sure it is always in the range of [0,1] #1236
Conversation
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
28b7d91
to
2036ef2
Compare
} | ||
} | ||
|
||
func normalize(score float64) float64 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: if we are just going to set hard limits on values, lets name this function differently. True normalization would operate differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[True normalization would operate differently.](nit: if we are just going to set hard limits on values, lets name this function differently. True normalization would operate differently.)
you're right. I didn't have a good naming idea for this purpose. any good idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated to enforceScoreRange
. not sure about the name selection but I have no better idea atm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, or applyScoreLimiting
something like that. Normalize was just misleading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your name sounds better 🙂.
will update
Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kfswain, nirrozenbaum The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…rnetes-sigs#1236) * normalize score to make sure score is always in the range of [0,1] Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com> * code review commentsx Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com> --------- Signed-off-by: Nir Rozenbaum <nirro@il.ibm.com>
Up until today, a scorer may return any float value even though the documentation specifies the valid range is [0,1].
This PR adds normalization function to validate the range is not exceeded.