Skip to content

Fixing renmants of argument keyword in public API #2636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 20, 2019

Conversation

abgoswam
Copy link
Member

Fixes #2557

  • Scrubbed the public API surface area using the ApiReviewer tool

{
return new FastTreeBinaryClassificationTrainer.ObjectiveImpl(
TrainSet,
ConvertTargetsToBool(TrainSet.Targets),
Args.LearningRates,
Copy link
Contributor

@artidoro artidoro Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Args [](start = 16, length = 4)

Why nor Options? #Closed

Copy link
Member Author

@abgoswam abgoswam Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to give a name to this property so that users would easily be able to distinguish to from the class Options .

In some cases it causes conflicts in our code itself , to have a property and class with same name


In reply to: 258278906 [](ancestors = 258278906)

@@ -104,7 +104,7 @@ public sealed class Options : OptionsBase
internal MulticlassLogisticRegression(IHostEnvironment env, Options options)
: base(env, options, TrainerUtils.MakeU4ScalarColumn(options.LabelColumn))
{
ShowTrainingStats = Args.ShowTrainingStats;
ShowTrainingStats = LbfgsTrainerOptions.ShowTrainingStats;
Copy link
Contributor

@artidoro artidoro Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LbfgsTrainerOptions [](start = 32, length = 19)

Same here why not naming this Options? #Closed

Copy link
Member Author

@abgoswam abgoswam Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly for clarity. Throughout the public API surface we have the class Options to represent a particular concept.

I wanted to name this property something different , so users can draw the distinction with the Options class

In some cases it causes conflicts in our code itself , to have a property and class with same name


In reply to: 258279561 [](ancestors = 258279561)

@@ -73,7 +73,7 @@ public Options()
{
Host.CheckNonEmpty(featureColumn, nameof(featureColumn));
Host.CheckNonEmpty(labelColumn, nameof(labelColumn));
_loss = loss ?? Args.LossFunction.CreateComponent(env);
_loss = loss ?? SdcaTrainerOptions.LossFunction.CreateComponent(env);
Copy link
Contributor

@artidoro artidoro Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SdcaTrainerOptions [](start = 28, length = 18)

Here as well? why not Options? #Closed

Copy link
Member Author

@abgoswam abgoswam Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly for clarity, to help users distinguish between this property v/s class Options

In some cases it causes conflicts in our code itself , to have a property and class with same name


In reply to: 258279715 [](ancestors = 258279715)

@@ -200,13 +200,13 @@ private void Run(IChannel ch)

if (_model == null)
{
if (string.IsNullOrEmpty(Args.InputModelFile))
if (string.IsNullOrEmpty(ImplOptions.InputModelFile))
Copy link
Contributor

@artidoro artidoro Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImplOptions [](start = 41, length = 11)

If possible could you not use abbreviations? And here too, just curious why not Options? #Closed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(plz see above)


In reply to: 258279957 [](ancestors = 258279957)

@@ -20,23 +20,23 @@ public abstract class ArgumentsBase
}

protected readonly IHost Host;
protected readonly TArgs Args;
protected readonly TOptions BaseSubsetSelectorOptions;
Copy link
Contributor

@artidoro artidoro Feb 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BaseSubsetSelectorOptions [](start = 36, length = 25)

Why not Options? #Closed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(plz see above)


In reply to: 258280102 [](ancestors = 258280102)

@codecov
Copy link

codecov bot commented Feb 20, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@bd00c1e). Click here to learn what that means.
The diff coverage is 74.67%.

@@            Coverage Diff            @@
##             master    #2636   +/-   ##
=========================================
  Coverage          ?   71.53%           
=========================================
  Files             ?      801           
  Lines             ?   141840           
  Branches          ?    16119           
=========================================
  Hits              ?   101471           
  Misses            ?    35919           
  Partials          ?     4450
Flag Coverage Δ
#Debug 71.53% <74.67%> (?)
#production 67.83% <73.22%> (?)
#test 85.73% <100%> (?)
Impacted Files Coverage Δ
...ft.ML.StandardLearners/Standard/MultiClass/Pkpd.cs 88.23% <ø> (ø)
src/Microsoft.ML.FastTree/FastTreeArguments.cs 85.71% <ø> (ø)
...oft.ML.StandardLearners/Standard/MultiClass/Ova.cs 74.17% <ø> (ø)
src/Microsoft.ML.FastTree/GamModelParameters.cs 46.51% <0%> (ø)
src/Microsoft.ML.Data/Model/Pfa/SavePfaCommand.cs 0% <0%> (ø)
src/Microsoft.ML.Sweeper/ConfigRunner.cs 0% <0%> (ø)
src/Microsoft.ML.Sweeper/SweepResultEvaluator.cs 0% <0%> (ø)
src/Microsoft.ML.FastTree/FastTreeRanking.cs 47.8% <100%> (ø)
test/Microsoft.ML.Sweeper.Tests/TestSweeper.cs 93.01% <100%> (ø)
src/Microsoft.ML.FastTree/FastTree.cs 80.68% <100%> (ø)
... and 38 more

Copy link
Contributor

@artidoro artidoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Abhishek!

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@abgoswam abgoswam merged commit fb6ce54 into dotnet:master Feb 20, 2019
@abgoswam abgoswam deleted the abgoswam/arguments_2 branch March 20, 2019 20:13
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants