@@ -31,7 +31,7 @@ public void TestMinimumCommandLineArgs()
31
31
32
32
var parser = new CommandLineBuilder ( )
33
33
// Parser
34
- . AddCommand ( CommandDefinitions . New ( handler ) )
34
+ . AddCommand ( CommandDefinitions . AutoTrain ( handler ) )
35
35
. UseDefaults ( )
36
36
. UseExceptionHandler ( ( e , ctx ) =>
37
37
{
@@ -41,7 +41,7 @@ public void TestMinimumCommandLineArgs()
41
41
42
42
var trainDataset = Path . GetTempFileName ( ) ;
43
43
var testDataset = Path . GetTempFileName ( ) ;
44
- string [ ] args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , "Label" } ;
44
+ string [ ] args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , "Label" } ;
45
45
parser . InvokeAsync ( args ) . Wait ( ) ;
46
46
File . Delete ( trainDataset ) ;
47
47
File . Delete ( testDataset ) ;
@@ -63,7 +63,7 @@ public void TestCommandLineArgsFailTest()
63
63
64
64
var parser = new CommandLineBuilder ( )
65
65
// parser
66
- . AddCommand ( CommandDefinitions . New ( handler ) )
66
+ . AddCommand ( CommandDefinitions . AutoTrain ( handler ) )
67
67
. UseDefaults ( )
68
68
. UseExceptionHandler ( ( e , ctx ) =>
69
69
{
@@ -76,22 +76,22 @@ public void TestCommandLineArgsFailTest()
76
76
var testDataset = Path . GetTempFileName ( ) ;
77
77
78
78
//wrong value to ml-task
79
- string [ ] args = new [ ] { "new " , "--ml-task" , "bad-value" , "--train-dataset" , trainDataset , "--label-column-name" , "Label" } ;
79
+ string [ ] args = new [ ] { "auto-train " , "--ml-task" , "bad-value" , "--train-dataset" , trainDataset , "--label-column-name" , "Label" } ;
80
80
parser . InvokeAsync ( args ) . Wait ( ) ;
81
81
Assert . IsFalse ( parsingSuccessful ) ;
82
82
83
83
// Incorrect invocation
84
- args = new [ ] { "new " , "binary-classification" , "--train-dataset" , trainDataset , "--label-column-name" , "Label" } ;
84
+ args = new [ ] { "auto-train " , "binary-classification" , "--train-dataset" , trainDataset , "--label-column-name" , "Label" } ;
85
85
parser . InvokeAsync ( args ) . Wait ( ) ;
86
86
Assert . IsFalse ( parsingSuccessful ) ;
87
87
88
88
// Non-existent file test
89
- args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--train-dataset" , "nonexistentfile.csv" , "--label-column-name" , "Label" } ;
89
+ args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--train-dataset" , "nonexistentfile.csv" , "--label-column-name" , "Label" } ;
90
90
parser . InvokeAsync ( args ) . Wait ( ) ;
91
91
Assert . IsFalse ( parsingSuccessful ) ;
92
92
93
93
// No label column or index test
94
- args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--train-dataset" , trainDataset , "--test-dataset" , testDataset } ;
94
+ args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--train-dataset" , trainDataset , "--test-dataset" , testDataset } ;
95
95
parser . InvokeAsync ( args ) . Wait ( ) ;
96
96
File . Delete ( trainDataset ) ;
97
97
File . Delete ( testDataset ) ;
@@ -128,7 +128,7 @@ public void TestCommandLineArgsValuesTest()
128
128
129
129
var parser = new CommandLineBuilder ( )
130
130
// Parser
131
- . AddCommand ( CommandDefinitions . New ( handler ) )
131
+ . AddCommand ( CommandDefinitions . AutoTrain ( handler ) )
132
132
. UseDefaults ( )
133
133
. UseExceptionHandler ( ( e , ctx ) =>
134
134
{
@@ -137,7 +137,7 @@ public void TestCommandLineArgsValuesTest()
137
137
. Build ( ) ;
138
138
139
139
// Incorrect mltask test
140
- string [ ] args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--validation-dataset" , validDataset , "--test-dataset" , testDataset , "--max-exploration-time" , "5" , "--name" , name , "--output-path" , outputPath , "--has-header" , falseString } ;
140
+ string [ ] args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--validation-dataset" , validDataset , "--test-dataset" , testDataset , "--max-exploration-time" , "5" , "--name" , name , "--output-path" , outputPath , "--has-header" , falseString } ;
141
141
parser . InvokeAsync ( args ) . Wait ( ) ;
142
142
File . Delete ( trainDataset ) ;
143
143
File . Delete ( testDataset ) ;
@@ -164,7 +164,7 @@ public void TestCommandLineArgsMutuallyExclusiveArgsTest()
164
164
165
165
var parser = new CommandLineBuilder ( )
166
166
// Parser
167
- . AddCommand ( CommandDefinitions . New ( handler ) )
167
+ . AddCommand ( CommandDefinitions . AutoTrain ( handler ) )
168
168
. UseDefaults ( )
169
169
. UseExceptionHandler ( ( e , ctx ) =>
170
170
{
@@ -173,17 +173,17 @@ public void TestCommandLineArgsMutuallyExclusiveArgsTest()
173
173
. Build ( ) ;
174
174
175
175
// Incorrect arguments : specifying dataset and train-dataset
176
- string [ ] args = new [ ] { "new " , "--ml-task" , "BinaryClassification" , "--dataset" , dataset , "--train-dataset" , trainDataset , "--label-column-name" , labelName , "--test-dataset" , testDataset , "--max-exploration-time" , "5" } ;
176
+ string [ ] args = new [ ] { "auto-train " , "--ml-task" , "BinaryClassification" , "--dataset" , dataset , "--train-dataset" , trainDataset , "--label-column-name" , labelName , "--test-dataset" , testDataset , "--max-exploration-time" , "5" } ;
177
177
parser . InvokeAsync ( args ) . Wait ( ) ;
178
178
Assert . IsFalse ( parsingSuccessful ) ;
179
179
180
180
// Incorrect arguments : specifying train-dataset and not specifying test-dataset
181
- args = new [ ] { "new " , "--ml-task" , "BinaryClassification" , "--train-dataset" , trainDataset , "--label-column-name" , labelName , "--max-exploration-time" , "5" } ;
181
+ args = new [ ] { "auto-train " , "--ml-task" , "BinaryClassification" , "--train-dataset" , trainDataset , "--label-column-name" , labelName , "--max-exploration-time" , "5" } ;
182
182
parser . InvokeAsync ( args ) . Wait ( ) ;
183
183
Assert . IsFalse ( parsingSuccessful ) ;
184
184
185
185
// Incorrect arguments : specifying label column name and index
186
- args = new [ ] { "new " , "--ml-task" , "BinaryClassification" , "--train-dataset" , trainDataset , "--label-column-name" , labelName , "--label-column-index" , "0" , "--test-dataset" , testDataset , "--max-exploration-time" , "5" } ;
186
+ args = new [ ] { "auto-train " , "--ml-task" , "BinaryClassification" , "--train-dataset" , trainDataset , "--label-column-name" , labelName , "--label-column-index" , "0" , "--test-dataset" , testDataset , "--max-exploration-time" , "5" } ;
187
187
parser . InvokeAsync ( args ) . Wait ( ) ;
188
188
File . Delete ( trainDataset ) ;
189
189
File . Delete ( testDataset ) ;
@@ -214,7 +214,7 @@ public void CacheArgumentTest()
214
214
215
215
var parser = new CommandLineBuilder ( )
216
216
// Parser
217
- . AddCommand ( CommandDefinitions . New ( handler ) )
217
+ . AddCommand ( CommandDefinitions . AutoTrain ( handler ) )
218
218
. UseDefaults ( )
219
219
. UseExceptionHandler ( ( e , ctx ) =>
220
220
{
@@ -223,30 +223,30 @@ public void CacheArgumentTest()
223
223
. Build ( ) ;
224
224
225
225
// valid cache test
226
- string [ ] args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , cache } ;
226
+ string [ ] args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , cache } ;
227
227
parser . InvokeAsync ( args ) . Wait ( ) ;
228
228
Assert . IsTrue ( parsingSuccessful ) ;
229
229
230
230
parsingSuccessful = false ;
231
231
232
232
cache = "off" ;
233
233
// valid cache test
234
- args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , cache } ;
234
+ args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , cache } ;
235
235
parser . InvokeAsync ( args ) . Wait ( ) ;
236
236
Assert . IsTrue ( parsingSuccessful ) ;
237
237
238
238
parsingSuccessful = false ;
239
239
240
240
cache = "auto" ;
241
241
// valid cache test
242
- args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , cache } ;
242
+ args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , cache } ;
243
243
parser . InvokeAsync ( args ) . Wait ( ) ;
244
244
Assert . IsTrue ( parsingSuccessful ) ;
245
245
246
246
parsingSuccessful = false ;
247
247
248
248
// invalid cache test
249
- args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , "blah" } ;
249
+ args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--cache" , "blah" } ;
250
250
parser . InvokeAsync ( args ) . Wait ( ) ;
251
251
Assert . IsFalse ( parsingSuccessful ) ;
252
252
@@ -276,7 +276,7 @@ public void IgnoreColumnsArgumentTest()
276
276
277
277
var parser = new CommandLineBuilder ( )
278
278
// Parser
279
- . AddCommand ( CommandDefinitions . New ( handler ) )
279
+ . AddCommand ( CommandDefinitions . AutoTrain ( handler ) )
280
280
. UseDefaults ( )
281
281
. UseExceptionHandler ( ( e , ctx ) =>
282
282
{
@@ -285,13 +285,13 @@ public void IgnoreColumnsArgumentTest()
285
285
. Build ( ) ;
286
286
287
287
// valid cache test
288
- string [ ] args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--ignore-columns" , ignoreColumns } ;
288
+ string [ ] args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--ignore-columns" , ignoreColumns } ;
289
289
parser . InvokeAsync ( args ) . Wait ( ) ;
290
290
Assert . IsTrue ( parsingSuccessful ) ;
291
291
292
292
parsingSuccessful = false ;
293
293
294
- args = new [ ] { "new " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--ignore-columns" , "a b c" } ;
294
+ args = new [ ] { "auto-train " , "--ml-task" , "binary-classification" , "--dataset" , trainDataset , "--label-column-name" , labelName , "--ignore-columns" , "a b c" } ;
295
295
parser . InvokeAsync ( args ) . Wait ( ) ;
296
296
Assert . IsFalse ( parsingSuccessful ) ;
297
297
0 commit comments