You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that the call to spline.sample() is not guaranteed to return a value. In particular, since the requested interpolation method is Interpolation::Linear, the only way the sample could be None is if search_lower_cp() returned None before the sampling was actually attempted.
I'm not sure if it makes sense for sample_with_key() to fall back to i = 0 if search_lower_cp() returned None (for one thing, there may not be a keys[0], for another, the math might turn out wrong). It might be better to have interpolate_target_q return an Option, but its only call site is interpolated_target_q which doesn't have much room for "value not available" as it bubbles the result directly to its only caller, per_shot_target_quality() which is quite definitive and only returns an error in case of an encoder crash and not any other type of situation.
I suspect in this case scores was empty, for unknown reasons? In that case, the calculation of interpolated target might need to extend the evaluated fragment until it isn't?
The text was updated successfully, but these errors were encountered:
This corresponds to the last unwrap in the following code fragment:
The problem is that the call to
spline.sample()
is not guaranteed to return a value. In particular, since the requested interpolation method isInterpolation::Linear
, the only way the sample could beNone
is ifsearch_lower_cp()
returnedNone
before the sampling was actually attempted.I'm not sure if it makes sense for
sample_with_key()
to fall back toi = 0
ifsearch_lower_cp()
returnedNone
(for one thing, there may not be akeys[0]
, for another, the math might turn out wrong). It might be better to haveinterpolate_target_q
return anOption
, but its only call site isinterpolated_target_q
which doesn't have much room for "value not available" as it bubbles the result directly to its only caller,per_shot_target_quality()
which is quite definitive and only returns an error in case of an encoder crash and not any other type of situation.I suspect in this case
scores
was empty, for unknown reasons? In that case, the calculation of interpolated target might need to extend the evaluated fragment until it isn't?The text was updated successfully, but these errors were encountered: