We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5dc0ce commit e6da4a4Copy full SHA for e6da4a4
src/Microsoft.ML.Auto/Utils/UserInputValidationUtil.cs
@@ -46,8 +46,8 @@ private static void ValidateTrainData(IDataView trainData)
46
{
47
throw new ArgumentNullException(nameof(trainData), "Training data cannot be null");
48
}
49
-
50
- if (trainData.Schema.GetColumnOrNull(DefaultColumnNames.Features)?.Type.GetItemType() != NumberType.R4)
+ var type = trainData.Schema.GetColumnOrNull(DefaultColumnNames.Features)?.Type.GetItemType();
+ if (type != null && type != NumberType.R4)
51
52
throw new ArgumentException($"{DefaultColumnNames.Features} column must be of data type Single", nameof(trainData));
53
0 commit comments