@@ -18,23 +18,19 @@ public static System.CommandLine.Command New()
18
18
{
19
19
var newCommand = new System . CommandLine . Command ( "new" , "ML.NET CLI tool for code generation" ,
20
20
21
- handler : CommandHandler . Create < /* FileInfo,*/ FileInfo , /* FileInfo,*/ FileInfo , TaskKind , string > ( ( /* FileInfo dataset,*/ FileInfo trainDataset , /*FileInfo validationDataset,*/ FileInfo testDataset , TaskKind mlTask , string labelColumnName ) =>
21
+ handler : CommandHandler . Create < FileInfo , FileInfo , TaskKind , string > ( ( FileInfo trainDataset , FileInfo testDataset , TaskKind mlTask , string labelColumnName ) =>
22
22
{
23
23
NewCommand . Run ( new Options ( )
24
24
{
25
- /*Dataset = dataset,*/
26
25
TrainDataset = trainDataset ,
27
- /*ValidationDataset = validationDataset,*/
28
26
TestDataset = testDataset ,
29
27
MlTask = mlTask ,
30
28
LabelName = labelColumnName
31
29
} ) ;
32
30
33
31
} ) )
34
32
{
35
- //Dataset(),
36
33
TrainDataset ( ) ,
37
- //ValidationDataset(),
38
34
TestDataset ( ) ,
39
35
MlTask ( ) ,
40
36
LabelName ( ) ,
@@ -51,10 +47,6 @@ public static System.CommandLine.Command New()
51
47
{
52
48
return "Option required : --train-dataset" ;
53
49
}
54
- if ( sym . Children [ "--test-dataset" ] == null )
55
- {
56
- return "Option required : --test-dataset" ;
57
- }
58
50
if ( sym . Children [ "--ml-task" ] == null )
59
51
{
60
52
return "Option required : --ml-task" ;
@@ -69,21 +61,14 @@ public static System.CommandLine.Command New()
69
61
70
62
return newCommand ;
71
63
72
- //Option Dataset() =>
73
- // new Option("--dataset", "Dataset file path.",
74
- // new Argument<FileInfo>().ExistingOnly());
75
64
76
65
Option TrainDataset ( ) =>
77
66
new Option ( "--train-dataset" , "Train dataset file path." ,
78
67
new Argument < FileInfo > ( ) . ExistingOnly ( ) ) ;
79
68
80
- //Option ValidationDataset() =>
81
- // new Option("--validation-dataset", "Test dataset file path.",
82
- // new Argument<FileInfo>().ExistingOnly());
83
-
84
69
Option TestDataset ( ) =>
85
70
new Option ( "--test-dataset" , "Test dataset file path." ,
86
- new Argument < FileInfo > ( ) . ExistingOnly ( ) ) ;
71
+ new Argument < FileInfo > ( defaultValue : default ( FileInfo ) ) . ExistingOnly ( ) ) ;
87
72
88
73
Option MlTask ( ) =>
89
74
new Option ( "--ml-task" , "Type of ML task." ,
@@ -93,27 +78,6 @@ Option LabelName() =>
93
78
new Option ( "--label-column-name" , "Name of the label column." ,
94
79
new Argument < string > ( ) ) ;
95
80
96
- //Option ColumnSeperator() =>
97
- // new Option("--column-separator", "Column separator in dataset file.",
98
- // new Argument<string>(defaultValue: default(string)));
99
-
100
- //Option ExplorationTimeout() =>
101
- // new Option("--exploration-timeout", "Timeout for exploring the best models.",
102
- // new Argument<int>(defaultValue: 10));
103
-
104
- //Option Name() =>
105
- // new Option("--name", "Name of the project file.",
106
- // new Argument<string>(defaultValue: "SampleProject"));
107
-
108
- //Option ShowOutput() =>
109
- // new Option("--show-output", "Show output on the console",
110
- // new Argument<bool>(defaultValue: true));
111
-
112
- //Option LabelIndex() =>
113
- // new Option("--label-column-index", "Index of the label column.",
114
- // new Argument<int>(defaultValue: -1));
115
-
116
-
117
81
}
118
82
119
83
private static string [ ] GetMlTaskSuggestions ( )
0 commit comments