Skip to content

Towards #2326 - removing some namespaces #2442

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 3 commits into from
Feb 10, 2019

Conversation

sfilipi
Copy link
Member

@sfilipi sfilipi commented Feb 6, 2019

Replacing the following namespaces as described in #2326:

Microsoft.ML.Internal.Internallearn.ResultProcessor
Microsoft.ML.Trainers.FastTree.Internal,
Microsoft.ML.Learners,
Microsoft.ML.Trainers.SymSGD.

@sfilipi sfilipi self-assigned this Feb 6, 2019
@sfilipi sfilipi added the API Issues pertaining the friendly API label Feb 6, 2019
@sfilipi sfilipi added this to the 0219 milestone Feb 6, 2019
@sfilipi sfilipi requested a review from yaeldekel February 6, 2019 23:03
@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.ML.Trainers.FastTree.Internal
namespace Microsoft.ML.Trainers.FastTree
{
#if OLD_DATALOAD
Copy link

@yaeldekel yaeldekel Feb 7, 2019

Choose a reason for hiding this comment

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

OLD_DATALOAD [](start = 4, length = 12)

Is this whole file inside the #if? #Resolved

Copy link
Contributor

@TomFinley TomFinley Feb 7, 2019

Choose a reason for hiding this comment

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

I think we could in principle safely remove this, but I'd make that a separate PR. #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

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

remove the file? of the directive?


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

Copy link
Member Author

Choose a reason for hiding this comment

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

it looks like.


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

Copy link
Member Author

Choose a reason for hiding this comment

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

I logged #2468 and put it up-for-grabs.


In reply to: 254895174 [](ancestors = 254895174,254797836)

@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace Microsoft.ML.Trainers.FastTree.Internal
namespace Microsoft.ML.Trainers.FastTree
{
#if OLD_DATALOAD
Copy link

@yaeldekel yaeldekel Feb 7, 2019

Choose a reason for hiding this comment

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

OLD_DATALOAD [](start = 4, length = 12)

Seems like all the files in this folder contain only grayed out code. #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

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

I can remove them on another PR. Logged #2468 and put it up-for-grabs :)


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

Copy link

@shmoradims shmoradims left a comment

Choose a reason for hiding this comment

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

:shipit:

@sfilipi
Copy link
Member Author

sfilipi commented Feb 8, 2019

@yaeldekel @TomFinley when you have a chance, lmk if this looks good or anything else needs to be changed.

using Microsoft.ML.Ensemble.Selector;
using Microsoft.ML.Ensemble.Selector.FeatureSelector;
using Microsoft.ML.EntryPoints;

[assembly: EntryPointModule(typeof(AllFeatureSelectorFactory))]
[assembly: EntryPointModule(typeof(RandomFeatureSelector))]

namespace Microsoft.ML.Ensemble.EntryPoints
namespace Microsoft.ML.Ensemble
{
[TlcModule.Component(Name = AllFeatureSelector.LoadName, FriendlyName = AllFeatureSelector.UserName)]
public sealed class AllFeatureSelectorFactory : ISupportFeatureSelectorFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this belong in Ensemble?

@@ -94,7 +94,7 @@ public void FastTreeClassificationIntrospectiveTraining()
public void FastForestRegressionIntrospectiveTraining()
{
var ml = new MLContext(seed: 1, conc: 1);
var data = DatasetUtils.GenerateFloatLabelFloatFeatureVectorSamples(1000);
var data = SamplesUtils.DatasetUtils.GenerateFloatLabelFloatFeatureVectorSamples(1000);
Copy link
Contributor

Choose a reason for hiding this comment

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

You're alreading using SamplesUtils. Maybe drop the namespace ref?

@@ -18,7 +17,7 @@ public partial class TrainerEstimators
public void TreeEnsembleFeaturizerOutputSchemaTest()
{
// Create data set
var data = DatasetUtils.GenerateBinaryLabelFloatFeatureVectorSamples(1000).ToList();
var data = SamplesUtils.DatasetUtils.GenerateBinaryLabelFloatFeatureVectorSamples(1000).ToList();
Copy link
Contributor

Choose a reason for hiding this comment

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

Using?

@@ -331,7 +331,7 @@ private void LightGbmHelper(bool useSoftmax, out string modelString, out List<Gb
floatLabels[i] = labels[i];

// Allocate LightGBM data container (called Dataset in LightGBM world).
var gbmDataSet = new Dataset(sampleValueGroupedByColumn, sampleIndicesGroupedByColumn, _columnNumber, sampleNonZeroCntPerColumn, _rowNumber, _rowNumber, "", floatLabels);
var gbmDataSet = new LightGBM.Dataset(sampleValueGroupedByColumn, sampleIndicesGroupedByColumn, _columnNumber, sampleNonZeroCntPerColumn, _rowNumber, _rowNumber, "", floatLabels);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you need the explicit namespace ref?

Copy link
Contributor

@rogancarr rogancarr left a comment

Choose a reason for hiding this comment

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

🥇 for 153 files!!!

LGMT, just a few nits.

@codecov
Copy link

codecov bot commented Feb 10, 2019

Codecov Report

Merging #2442 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2442      +/-   ##
==========================================
- Coverage   71.24%   71.23%   -0.01%     
==========================================
  Files         788      788              
  Lines      141131   141131              
  Branches    16115    16115              
==========================================
- Hits       100547   100541       -6     
- Misses      36119    36124       +5     
- Partials     4465     4466       +1
Flag Coverage Δ
#Debug 71.23% <100%> (-0.01%) ⬇️
#production 67.56% <ø> (-0.01%) ⬇️
#test 85.35% <100%> (-0.02%) ⬇️

@sfilipi sfilipi merged commit a3b6522 into dotnet:master Feb 10, 2019
@sfilipi sfilipi deleted the namespaceNitting branch February 10, 2019 08:12
@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
API Issues pertaining the friendly API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants