Skip to content

Commit 6fa307a

Browse files
srsaggamDmitry-A
authored andcommitted
Some spaces and extra lines + bug in output path (dotnet#204)
* nit picks * nit picks * fix test
1 parent 504d371 commit 6fa307a

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

src/mlnet.Test/ApprovalTests/ConsoleCodeGeneratorTests.GeneratedTrainCodeTest.approved.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ namespace MyNamespace
8383
return trainedModel;
8484
}
8585

86-
// (OPTIONAL) Try/test a single prediction by loding the model from the file, first.
86+
// (OPTIONAL) Try/test a single prediction by loading the model from the file, first.
8787
private static void TestSinglePrediction(MLContext mlContext)
8888
{
8989
//Load data to test. Could be any test data. For demonstration purpose train data is used here.

src/mlnet/Commands/CommandDefinitions.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Option Name() =>
9393

9494
Option OutputPath() =>
9595
new Option(new List<string>() { "--output-path" }, "Output folder path.",
96-
new Argument<DirectoryInfo>(defaultValue: new DirectoryInfo(".\\Sample")));
96+
new Argument<DirectoryInfo>(defaultValue: new DirectoryInfo(".")));
9797

9898
Option HasHeader() =>
9999
new Option(new List<string>() { "--has-header" }, "Specifies if the dataset has header or not.",

src/mlnet/Templates/Console/MLCodeGen.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ private static ITransformer BuildTrainEvaluateAndSaveModel(MLContext mlContext)
109109
{ Write("\r\n .Append(");
110110
}
111111
Write("mlContext.Transforms."+Transforms[i]);
112-
if(i>0)
113-
{ Write(")\r\n");
114-
}
115112
}
116113
this.Write(";\r\n");
117114
}
@@ -181,7 +178,7 @@ private static ITransformer BuildTrainEvaluateAndSaveModel(MLContext mlContext)
181178
return trainedModel;
182179
}
183180
184-
// (OPTIONAL) Try/test a single prediction by loding the model from the file, first.
181+
// (OPTIONAL) Try/test a single prediction by loading the model from the file, first.
185182
private static void TestSinglePrediction(MLContext mlContext)
186183
{
187184
//Load data to test. Could be any test data. For demonstration purpose train data is used here.

src/mlnet/Templates/Console/MLCodeGen.tt

+1-4
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ namespace <#= Namespace #>
7272
{ Write("\r\n .Append(");
7373
}
7474
Write("mlContext.Transforms."+Transforms[i]);
75-
if(i>0)
76-
{ Write(")\r\n");
77-
}
7875
}#>;
7976
<#}#>
8077

@@ -127,7 +124,7 @@ else{#>
127124
return trainedModel;
128125
}
129126

130-
// (OPTIONAL) Try/test a single prediction by loding the model from the file, first.
127+
// (OPTIONAL) Try/test a single prediction by loading the model from the file, first.
131128
private static void TestSinglePrediction(MLContext mlContext)
132129
{
133130
//Load data to test. Could be any test data. For demonstration purpose train data is used here.

0 commit comments

Comments
 (0)