Skip to content

Commit 179a99a

Browse files
committed
fix tests, re-add AutoML samples csproj
1 parent e54e6b3 commit 179a99a

File tree

2 files changed

+38
-11
lines changed

2 files changed

+38
-11
lines changed

Microsoft.ML.sln

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Microsoft.ML.AutoML", "Micr
274274
pkg\Microsoft.ML.AutoML\Microsoft.ML.AutoML.symbols.nupkgproj = pkg\Microsoft.ML.AutoML\Microsoft.ML.AutoML.symbols.nupkgproj
275275
EndProjectSection
276276
EndProject
277+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AutoML.Samples", "docs\samples\Microsoft.ML.AutoML.Samples\Microsoft.ML.AutoML.Samples.csproj", "{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}"
278+
EndProject
277279
Global
278280
GlobalSection(SolutionConfigurationPlatforms) = preSolution
279281
Debug|Any CPU = Debug|Any CPU
@@ -1586,6 +1588,30 @@ Global
15861588
{E48285BF-F49A-4EA3-AED0-1BDDBF77EB80}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
15871589
{E48285BF-F49A-4EA3-AED0-1BDDBF77EB80}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU
15881590
{E48285BF-F49A-4EA3-AED0-1BDDBF77EB80}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU
1591+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1592+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug|Any CPU.Build.0 = Debug|Any CPU
1593+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug|x64.ActiveCfg = Debug|Any CPU
1594+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug|x64.Build.0 = Debug|Any CPU
1595+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netcoreapp3_0|Any CPU.ActiveCfg = Debug-netcoreapp3_0|Any CPU
1596+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netcoreapp3_0|Any CPU.Build.0 = Debug-netcoreapp3_0|Any CPU
1597+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netcoreapp3_0|x64.ActiveCfg = Debug-netcoreapp3_0|Any CPU
1598+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netcoreapp3_0|x64.Build.0 = Debug-netcoreapp3_0|Any CPU
1599+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netfx|Any CPU.ActiveCfg = Debug-netfx|Any CPU
1600+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netfx|Any CPU.Build.0 = Debug-netfx|Any CPU
1601+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netfx|x64.ActiveCfg = Debug-netfx|Any CPU
1602+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Debug-netfx|x64.Build.0 = Debug-netfx|Any CPU
1603+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release|Any CPU.ActiveCfg = Release|Any CPU
1604+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release|Any CPU.Build.0 = Release|Any CPU
1605+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release|x64.ActiveCfg = Release|Any CPU
1606+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release|x64.Build.0 = Release|Any CPU
1607+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netcoreapp3_0|Any CPU.ActiveCfg = Release-netcoreapp3_0|Any CPU
1608+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netcoreapp3_0|Any CPU.Build.0 = Release-netcoreapp3_0|Any CPU
1609+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netcoreapp3_0|x64.ActiveCfg = Release-netcoreapp3_0|Any CPU
1610+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netcoreapp3_0|x64.Build.0 = Release-netcoreapp3_0|Any CPU
1611+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netfx|Any CPU.ActiveCfg = Release-netfx|Any CPU
1612+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netfx|Any CPU.Build.0 = Release-netfx|Any CPU
1613+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netfx|x64.ActiveCfg = Release-netfx|Any CPU
1614+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3}.Release-netfx|x64.Build.0 = Release-netfx|Any CPU
15891615
EndGlobalSection
15901616
GlobalSection(SolutionProperties) = preSolution
15911617
HideSolutionNode = FALSE
@@ -1671,6 +1697,7 @@ Global
16711697
{C2652287-CD6D-40FB-B042-95FB56D09DB8} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
16721698
{E48285BF-F49A-4EA3-AED0-1BDDBF77EB80} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
16731699
{F5D11F71-2D61-4AE9-99D7-0F0B54649B15} = {D3D38B03-B557-484D-8348-8BADEE4DF592}
1700+
{A6924919-9E37-4023-8B7F-E85C8E3CC9B3} = {DA452A53-2E94-4433-B08C-041EDEC729E6}
16741701
EndGlobalSection
16751702
GlobalSection(ExtensibilityGlobals) = postSolution
16761703
SolutionGuid = {41165AF1-35BB-4832-A189-73060F82B01D}

test/Microsoft.ML.AutoML.Tests/UserInputValidationTests.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class UserInputValidationTests
1818
public void ValidateExperimentExecuteNullTrainData()
1919
{
2020
var ex = Assert.Throws<ArgumentNullException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(null, new ColumnInformation(), null, TaskKind.Regression));
21-
Assert.Equal("Training data cannot be null" + Environment.NewLine + "Parameter name: trainData", ex.Message);
21+
Assert.StartsWith("Training data cannot be null", ex.Message);
2222
}
2323

2424
[Fact]
@@ -84,7 +84,7 @@ public void ValidateExperimentExecuteArgsTrainValidColCountMismatch()
8484

8585
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData,
8686
new ColumnInformation() { LabelColumnName = "0" }, validData, TaskKind.Regression));
87-
Assert.Equal("Training data and validation data schemas do not match. Train data has '2' columns,and validation data has '1' columns." + Environment.NewLine + "Parameter name: validationData", ex.Message);
87+
Assert.StartsWith("Training data and validation data schemas do not match. Train data has '2' columns,and validation data has '1' columns.", ex.Message);
8888
}
8989

9090
[Fact]
@@ -104,7 +104,7 @@ public void ValidateExperimentExecuteArgsTrainValidColNamesMismatch()
104104

105105
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData,
106106
new ColumnInformation() { LabelColumnName = "0" }, validData, TaskKind.Regression));
107-
Assert.Equal("Training data and validation data schemas do not match. Column '1' exsits in train data, but not in validation data." + Environment.NewLine + "Parameter name: validationData", ex.Message);
107+
Assert.StartsWith("Training data and validation data schemas do not match. Column '1' exsits in train data, but not in validation data.", ex.Message);
108108
}
109109

110110
[Fact]
@@ -124,21 +124,21 @@ public void ValidateExperimentExecuteArgsTrainValidColTypeMismatch()
124124

125125
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainData,
126126
new ColumnInformation() { LabelColumnName = "0" }, validData, TaskKind.Regression));
127-
Assert.Equal("Training data and validation data schemas do not match. Column '1' is of type String in train data, and type Single in validation data." + Environment.NewLine + "Parameter name: validationData", ex.Message);
127+
Assert.StartsWith("Training data and validation data schemas do not match. Column '1' is of type String in train data, and type Single in validation data.", ex.Message);
128128
}
129129

130130
[Fact]
131131
public void ValidateInferColumnsArgsNullPath()
132132
{
133133
var ex = Assert.Throws<ArgumentNullException>(() => UserInputValidationUtil.ValidateInferColumnsArgs(null, "Label"));
134-
Assert.Equal("Provided path cannot be null" + Environment.NewLine + "Parameter name: path", ex.Message);
134+
Assert.StartsWith("Provided path cannot be null", ex.Message);
135135
}
136136

137137
[Fact]
138138
public void ValidateInferColumnsArgsPathNotExist()
139139
{
140140
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateInferColumnsArgs("idontexist", "Label"));
141-
Assert.Equal("File 'idontexist' does not exist" + Environment.NewLine + "Parameter name: path", ex.Message);
141+
Assert.StartsWith("File 'idontexist' does not exist", ex.Message);
142142
}
143143

144144
[Fact]
@@ -147,7 +147,7 @@ public void ValidateInferColumnsArgsEmptyFile()
147147
const string emptyFilePath = "empty";
148148
File.Create(emptyFilePath).Dispose();
149149
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateInferColumnsArgs(emptyFilePath, "Label"));
150-
Assert.Equal("File at path 'empty' cannot be empty" + Environment.NewLine + "Parameter name: path", ex.Message);
150+
Assert.StartsWith("File at path 'empty' cannot be empty", ex.Message);
151151
}
152152

153153
[Fact]
@@ -166,7 +166,7 @@ public void ValidateFeaturesColInvalidType()
166166
var dataView = DataViewTestFixture.BuildDummyDataView(schema);
167167

168168
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(), null, TaskKind.Regression));
169-
Assert.Equal("Features column must be of data type Single" + Environment.NewLine + "Parameter name: trainData", ex.Message);
169+
Assert.StartsWith("Features column must be of data type Single", ex.Message);
170170
}
171171

172172
[Fact]
@@ -236,7 +236,7 @@ public void ValidateProhibitedFeatureColumnType()
236236

237237
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(),
238238
null, TaskKind.Regression));
239-
Assert.Equal("Only supported feature column types are Boolean, Single, and String. Please change the feature column UInt64 of type UInt64 to one of the supported types." + Environment.NewLine + "Parameter name: trainData", ex.Message);
239+
Assert.StartsWith("Only supported feature column types are Boolean, Single, and String. Please change the feature column UInt64 of type UInt64 to one of the supported types.", ex.Message);
240240
}
241241

242242
[Fact]
@@ -249,7 +249,7 @@ public void ValidateEmptyTrainingDataThrows()
249249
var dataView = DataViewTestFixture.BuildDummyDataView(schema, createDummyRow: false);
250250
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(dataView, new ColumnInformation(),
251251
null, TaskKind.Regression));
252-
Assert.Equal("Training data has 0 rows" + Environment.NewLine + "Parameter name: trainData", ex.Message);
252+
Assert.StartsWith("Training data has 0 rows", ex.Message);
253253
}
254254

255255
[Fact]
@@ -270,7 +270,7 @@ public void ValidateEmptyValidationDataThrows()
270270

271271
var ex = Assert.Throws<ArgumentException>(() => UserInputValidationUtil.ValidateExperimentExecuteArgs(trainingData, new ColumnInformation(),
272272
validationData, TaskKind.Regression));
273-
Assert.Equal("Validation data has 0 rows" + Environment.NewLine + "Parameter name: validationData", ex.Message);
273+
Assert.StartsWith("Validation data has 0 rows", ex.Message);
274274
}
275275

276276
private static void ValidateLabelTypeTestCore<LabelRawType>(TaskKind task, PrimitiveDataViewType labelType, bool labelTypeShouldBeValid)

0 commit comments

Comments
 (0)