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
Consider the above code. We have at line 834 this assignment to a boolean value depending on whether the input is of type vector, or not. This strongly suggests that the transform can accomodate non-vector types. However at lines 841 and 844, we have this type.AsVector.DimCount. Now, AsVector will be null in the case where the type is not a vector of course, so this would throw a null reference exception if we were to ever feed this transform a non-vector value.
So, there's something wrong here. Unfortunately the intent of what the author meant to write is somewhat hidden from me, so perhaps whoever wrote this code could check this out. Maybe even write a test to test this condition.
The text was updated successfully, but these errors were encountered:
codemzs
added
P1
Priority of the issue for triage purpose: Needs to be fixed soon.
and removed
P0
Priority of the issue for triage purpose: IMPORTANT, needs to be fixed right away.
labels
May 22, 2019
In the process of working on #1533, I found the following code in the tensorflow transform.
machinelearning/src/Microsoft.ML.TensorFlow/TensorflowTransform.cs
Lines 834 to 844 in 73762a8
Consider the above code. We have at line 834 this assignment to a boolean value depending on whether the input is of type vector, or not. This strongly suggests that the transform can accomodate non-vector types. However at lines 841 and 844, we have this
type.AsVector.DimCount
. Now,AsVector
will benull
in the case where the type is not a vector of course, so this would throw a null reference exception if we were to ever feed this transform a non-vector value.So, there's something wrong here. Unfortunately the intent of what the author meant to write is somewhat hidden from me, so perhaps whoever wrote this code could check this out. Maybe even write a test to test this condition.
The text was updated successfully, but these errors were encountered: