style: make NaN rejection explicit in score_sigma validation
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnsaJg74eNSva3PJjK2eej
This commit is contained in:
+1
-1
@@ -779,7 +779,7 @@ impl<T: Time, D: Drift<T>, O: Observer<T>, K: Eq + Hash + Clone> History<T, D, O
|
|||||||
}
|
}
|
||||||
crate::Outcome::Scored { scores, sigma } => {
|
crate::Outcome::Scored { scores, sigma } => {
|
||||||
let resolved = sigma.unwrap_or(self.score_sigma);
|
let resolved = sigma.unwrap_or(self.score_sigma);
|
||||||
if !(resolved > 0.0) {
|
if resolved <= 0.0 || resolved.is_nan() {
|
||||||
return Err(InferenceError::InvalidParameter {
|
return Err(InferenceError::InvalidParameter {
|
||||||
name: "score_sigma",
|
name: "score_sigma",
|
||||||
value: resolved,
|
value: resolved,
|
||||||
|
|||||||
Reference in New Issue
Block a user