-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this 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.
…the Microsoft.ML.Trainers.FastTree.Internal namespaces.
7fff634
to
2b60c6d
Compare
Codecov Report
@@ 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
|
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.