Skip to content

Commit ee67d50

Browse files
committed
Remove extra short names for entry point BC
1 parent 846345a commit ee67d50

File tree

7 files changed

+249
-448
lines changed

7 files changed

+249
-448
lines changed

src/Microsoft.ML.FastTree/FastTreeArguments.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
161161
/// <summary>
162162
/// The number of threads to use.
163163
/// </summary>
164-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The number of threads to use", ShortName = "t,NumThreads", NullName = "<Auto>")]
164+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The number of threads to use", ShortName = "t", NullName = "<Auto>")]
165165
public int? NumberOfThreads = null;
166166

167167
// this random seed is used for:
@@ -174,14 +174,14 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
174174
/// <summary>
175175
/// The seed of the random number generator.
176176
/// </summary>
177-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The seed of the random number generator", ShortName = "r1,RngSeed")]
177+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The seed of the random number generator", ShortName = "r1")]
178178
public int Seed = 123;
179179

180180
// this random seed is only for active feature selection
181181
/// <summary>
182182
/// The seed of the active feature selection.
183183
/// </summary>
184-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The seed of the active feature selection", ShortName = "r3,FeatureSelectSeed", Hide = true)]
184+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The seed of the active feature selection", ShortName = "r3", Hide = true)]
185185
[TGUI(NotGui = true)]
186186
public int FeatureSelectionSeed = 123;
187187

@@ -221,25 +221,25 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
221221
/// </summary>
222222
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum categorical split groups to consider when splitting on a categorical feature. " +
223223
"Split groups are a collection of split points. This is used to reduce overfitting when " +
224-
"there many categorical features.", ShortName = "mcg,MaxCategoricalGroupsPerNode")]
224+
"there many categorical features.", ShortName = "mcg")]
225225
public int MaximumCategoricalGroupCountPerNode = 64;
226226

227227
/// <summary>
228228
/// Maximum categorical split points to consider when splitting on a categorical feature.
229229
/// </summary>
230-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum categorical split points to consider when splitting on a categorical feature.", ShortName = "maxcat,MaxCategoricalSplitPoints")]
230+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum categorical split points to consider when splitting on a categorical feature.", ShortName = "maxcat")]
231231
public int MaximumCategoricalSplitPointCount = 64;
232232

233233
/// <summary>
234234
/// Minimum categorical example percentage in a bin to consider for a split. Default is 0.1% of all training examples.
235235
/// </summary>
236-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum categorical example percentage in a bin to consider for a split.", ShortName = "mdop,MinDocsPercentageForCategoricalSplit")]
236+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum categorical example percentage in a bin to consider for a split.", ShortName = "mdop")]
237237
public double MinimumExampleFractionForCategoricalSplit = 0.001;
238238

239239
/// <summary>
240240
/// Minimum categorical example count in a bin to consider for a split.
241241
/// </summary>
242-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum categorical example count in a bin to consider for a split.", ShortName = "mdo,MinDocsForCategoricalSplit")]
242+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum categorical example count in a bin to consider for a split.", ShortName = "mdo")]
243243
public int MinimumExamplesForCategoricalSplit = 100;
244244

245245
/// <summary>
@@ -262,7 +262,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
262262
/// <summary>
263263
/// Maximum number of distinct values (bins) per feature.
264264
/// </summary>
265-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum number of distinct values (bins) per feature", ShortName = "mb,MaxBins")]
265+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum number of distinct values (bins) per feature", ShortName = "mb")]
266266
public int MaximumBinCountPerFeature = 255; // save one for undefs
267267

268268
/// <summary>
@@ -300,14 +300,14 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
300300
/// <summary>
301301
/// Print execution time breakdown to ML.NET channel.
302302
/// </summary>
303-
[Argument(ArgumentType.AtMostOnce, HelpText = "Print execution time breakdown to stdout", ShortName = "et,ExecutionTimes")]
303+
[Argument(ArgumentType.AtMostOnce, HelpText = "Print execution time breakdown to stdout", ShortName = "et")]
304304
public bool ExecutionTime;
305305

306306
// REVIEW: Different from original FastRank arguments (shortname l vs. nl). Different default from TLC FR Wrapper (20 vs. 20).
307307
/// <summary>
308308
/// The max number of leaves in each regression tree.
309309
/// </summary>
310-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The max number of leaves in each regression tree", ShortName = "nl,NumLeaves", SortOrder = 2)]
310+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The max number of leaves in each regression tree", ShortName = "nl", SortOrder = 2)]
311311
[TGUI(Description = "The maximum number of leaves per tree", SuggestedSweeps = "2-128;log;inc:4")]
312312
[TlcModule.SweepableLongParamAttribute("NumLeaves", 2, 128, isLogScale: true, stepSize: 4)]
313313
public int NumberOfLeaves = Defaults.NumberOfLeaves;
@@ -317,7 +317,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
317317
/// </summary>
318318
// REVIEW: Arrays not supported in GUI
319319
// REVIEW: Different shortname than FastRank module. Same as the TLC FRWrapper.
320-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The minimal number of examples allowed in a leaf of a regression tree, out of the subsampled data", ShortName = "mil,MinDocumentsInLeafs", SortOrder = 3)]
320+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The minimal number of examples allowed in a leaf of a regression tree, out of the subsampled data", ShortName = "mil", SortOrder = 3)]
321321
[TGUI(Description = "Minimum number of training instances required to form a leaf", SuggestedSweeps = "1,10,50")]
322322
[TlcModule.SweepableDiscreteParamAttribute("MinDocumentsInLeafs", new object[] { 1, 10, 50 })]
323323
public int MinimumExampleCountPerLeaf = Defaults.MinimumExampleCountPerLeaf;
@@ -326,7 +326,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
326326
/// Total number of decision trees to create in the ensemble.
327327
/// </summary>
328328
// REVIEW: Different shortname than FastRank module. Same as the TLC FRWrapper.
329-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of decision trees to create in the ensemble", ShortName = "iter,NumTrees", SortOrder = 1)]
329+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of decision trees to create in the ensemble", ShortName = "iter", SortOrder = 1)]
330330
[TGUI(Description = "Total number of trees constructed", SuggestedSweeps = "20,100,500")]
331331
[TlcModule.SweepableDiscreteParamAttribute("NumTrees", new object[] { 20, 100, 500 })]
332332
public int NumberOfTrees = Defaults.NumberOfTrees;
@@ -346,7 +346,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
346346
/// <summary>
347347
/// Percentage of training examples used in each bag. Default is 0.7 (70%).
348348
/// </summary>
349-
[Argument(ArgumentType.AtMostOnce, HelpText = "Percentage of training examples used in each bag", ShortName = "bagfrac,BaggingTrainFraction")]
349+
[Argument(ArgumentType.AtMostOnce, HelpText = "Percentage of training examples used in each bag", ShortName = "bagfrac")]
350350
// REVIEW: sweeping bagfrac doesn't make sense unless 'baggingSize' is non-zero. The 'SuggestedSweeps' here
351351
// are used to denote 'sensible range', but the GUI will interpret this as 'you must sweep these values'. So, I'm keeping
352352
// the values there for the future, when we have an appropriate way to encode this information.
@@ -356,7 +356,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
356356
/// <summary>
357357
/// The fraction of features (chosen randomly) to use on each split. If it's value is 0.9, 90% of all features would be dropped in expectation.
358358
/// </summary>
359-
[Argument(ArgumentType.AtMostOnce, HelpText = "The fraction of features (chosen randomly) to use on each split", ShortName = "sf,SplitFraction")]
359+
[Argument(ArgumentType.AtMostOnce, HelpText = "The fraction of features (chosen randomly) to use on each split", ShortName = "sf")]
360360
public Double FeatureFractionPerSplit = 1;
361361

362362
/// <summary>
@@ -391,7 +391,7 @@ public abstract class TreeOptions : TrainerInputBaseWithGroupId
391391
/// Maximum Number of trees after compression.
392392
/// </summary>
393393
// REVIEW: Not used.
394-
[Argument(ArgumentType.AtMostOnce, HelpText = "Maximum Number of trees after compression", ShortName = "cmpmax,MaxTreesAfterCompression", Hide = true)]
394+
[Argument(ArgumentType.AtMostOnce, HelpText = "Maximum Number of trees after compression", ShortName = "cmpmax", Hide = true)]
395395
[TGUI(NotGui = true)]
396396
public int MaximumTreeCountAfterCompression = -1;
397397

@@ -465,13 +465,13 @@ public abstract class BoostedTreeOptions : TreeOptions
465465
/// <summary>
466466
/// Number of post-bracket line search steps.
467467
/// </summary>
468-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Number of post-bracket line search steps", ShortName = "lssteps,NumPostBracketSteps")]
468+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Number of post-bracket line search steps", ShortName = "lssteps")]
469469
public int MaximumNumberOfLineSearchSteps;
470470

471471
/// <summary>
472472
/// Minimum line search step size.
473473
/// </summary>
474-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum line search step size", ShortName = "minstep,MinStepSize")]
474+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum line search step size", ShortName = "minstep")]
475475
public Double MinimumStepSize;
476476

477477
public enum OptimizationAlgorithmType { GradientDescent, AcceleratedGradientDescent, ConjugateGradientDescent };
@@ -525,7 +525,7 @@ public enum OptimizationAlgorithmType { GradientDescent, AcceleratedGradientDesc
525525
/// <summary>
526526
/// The learning rate.
527527
/// </summary>
528-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The learning rate", ShortName = "lr,LearningRates", SortOrder = 4)]
528+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The learning rate", ShortName = "lr", SortOrder = 4)]
529529
[TGUI(Label = "Learning Rate", SuggestedSweeps = "0.025-0.4;log")]
530530
[TlcModule.SweepableFloatParamAttribute("LearningRates", 0.025f, 0.4f, isLogScale: true)]
531531
public double LearningRate = Defaults.LearningRate;
@@ -561,7 +561,7 @@ public enum OptimizationAlgorithmType { GradientDescent, AcceleratedGradientDesc
561561
/// <summary>
562562
/// Upper bound on absolute value of single tree output.
563563
/// </summary>
564-
[Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single tree output", ShortName = "mo,MaxTreeOutput")]
564+
[Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single tree output", ShortName = "mo")]
565565
public Double MaximumTreeOutput = 100;
566566

567567
/// <summary>

src/Microsoft.ML.FastTree/GamTrainer.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,35 +63,35 @@ public abstract class OptionsBase : TrainerInputBaseWithWeight
6363
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Tree fitting gain confidence requirement (should be in the range [0,1) ).", ShortName = "gainconf")]
6464
public int GainConfidenceLevel;
6565

66-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of iterations over all features", ShortName = "iter,NumIterations", SortOrder = 1)]
66+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Total number of iterations over all features", ShortName = "iter", SortOrder = 1)]
6767
[TGUI(SuggestedSweeps = "200,1500,9500")]
6868
[TlcModule.SweepableDiscreteParamAttribute("NumIterations", new object[] { 200, 1500, 9500 })]
6969
public int NumberOfIterations = GamDefaults.NumberOfIterations;
7070

71-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The number of threads to use", ShortName = "t,NumThreads", NullName = "<Auto>")]
71+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The number of threads to use", ShortName = "t", NullName = "<Auto>")]
7272
public int? NumberOfThreads = null;
7373

74-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The learning rate", ShortName = "lr,LearningRates", SortOrder = 4)]
74+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The learning rate", ShortName = "lr", SortOrder = 4)]
7575
[TGUI(SuggestedSweeps = "0.001,0.1;log")]
7676
[TlcModule.SweepableFloatParamAttribute("LearningRates", 0.001f, 0.1f, isLogScale: true)]
7777
public double LearningRate = GamDefaults.LearningRate;
7878

7979
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Whether to utilize the disk or the data's native transposition facilities (where applicable) when performing the transpose", ShortName = "dt")]
8080
public bool? DiskTranspose;
8181

82-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum number of distinct values (bins) per feature", ShortName = "mb,MaxBins")]
82+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Maximum number of distinct values (bins) per feature", ShortName = "mb")]
8383
public int MaximumBinCountPerFeature = GamDefaults.MaximumBinCountPerFeature;
8484

85-
[Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single output", ShortName = "mo,MaxOutput")]
85+
[Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single output", ShortName = "mo")]
8686
public double MaximumTreeOutput = double.PositiveInfinity;
8787

8888
[Argument(ArgumentType.AtMostOnce, HelpText = "Sample each query 1 in k times in the GetDerivatives function", ShortName = "sr")]
8989
public int GetDerivativesSampleRate = 1;
9090

91-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The seed of the random number generator", ShortName = "r1,RngSeed")]
91+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "The seed of the random number generator", ShortName = "r1")]
9292
public int Seed = 123;
9393

94-
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum number of training instances required to form a partition", ShortName = "mi,MinDocuments", SortOrder = 3)]
94+
[Argument(ArgumentType.LastOccurenceWins, HelpText = "Minimum number of training instances required to form a partition", ShortName = "mi", SortOrder = 3)]
9595
[TGUI(SuggestedSweeps = "1,10,50")]
9696
[TlcModule.SweepableDiscreteParamAttribute("MinDocuments", new object[] { 1, 10, 50 })]
9797
public int MinimumExampleCountPerLeaf = 10;

src/Microsoft.ML.FastTree/RandomForestClassification.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Microsoft.ML.Trainers.FastTree
3131
{
3232
public abstract class FastForestOptionsBase : TreeOptions
3333
{
34-
[Argument(ArgumentType.AtMostOnce, HelpText = "Number of labels to be sampled from each leaf to make the distribtuion", ShortName = "qsc,QuantileSampleCount")]
34+
[Argument(ArgumentType.AtMostOnce, HelpText = "Number of labels to be sampled from each leaf to make the distribtuion", ShortName = "qsc")]
3535
public int NumberOfQuantileSamples = 100;
3636

3737
public FastForestOptionsBase()
@@ -110,7 +110,7 @@ public sealed partial class FastForestClassification :
110110
{
111111
public sealed class Options : FastForestOptionsBase
112112
{
113-
[Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single tree output", ShortName = "mo,MaxTreeOutput")]
113+
[Argument(ArgumentType.AtMostOnce, HelpText = "Upper bound on absolute value of single tree output", ShortName = "mo")]
114114
public Double MaximumOutputMagnitudePerTree = 100;
115115

116116
[Argument(ArgumentType.AtMostOnce, HelpText = "The calibrator kind to apply to the predictor. Specify null for no calibration", Visibility = ArgumentAttribute.VisibilityType.EntryPointsOnly)]

0 commit comments

Comments
 (0)