Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,33 @@
Text="The tools directory [$(ToolsDir)] does not exist. Please run build in the root of the repo to ensure the tools are installed before attempting to build an individual project." />
</Target>

<Target Name="CopyNativeAssemblies"
BeforeTargets="PrepareForRun">

<PropertyGroup>
<LibPrefix Condition="'$(OS)' != 'Windows_NT'">lib</LibPrefix>
<LibExtension Condition="'$(OS)' == 'Windows_NT'">.dll</LibExtension>
<LibExtension Condition="'$(OS)' != 'Windows_NT'">.so</LibExtension>
<LibExtension Condition="$([MSBuild]::IsOSPlatform('osx'))">.dylib</LibExtension>
</PropertyGroup>

<ItemGroup>
<NativeAssemblyReference>
<FullAssemblyPath>$(NativeOutputPath)$(LibPrefix)%(NativeAssemblyReference.Identity)$(LibExtension)</FullAssemblyPath>
</NativeAssemblyReference>
</ItemGroup>

<Copy SourceFiles = "@(NativeAssemblyReference->'%(FullAssemblyPath)')"
DestinationFolder="$(OutputPath)"
OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)"
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)"
UseHardlinksIfPossible="$(CreateHardLinksForPublishFilesIfPossible)"
UseSymboliclinksIfPossible="$(CreateSymbolicLinksForPublishFilesIfPossible)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
</Copy>

</Target>

<Import Project="$(ToolsDir)/versioning.targets" Condition="Exists('$(ToolsDir)/versioning.targets')" />
</Project>
18 changes: 17 additions & 1 deletion src/Microsoft.ML.Console/Microsoft.ML.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,25 @@

<ItemGroup>
<ProjectReference Include="..\Microsoft.ML.Core\Microsoft.ML.Core.csproj" />
<ProjectReference Include="..\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj" />
<ProjectReference Include="..\Microsoft.ML.Data\Microsoft.ML.Data.csproj" />
<ProjectReference Include="..\Microsoft.ML.Ensemble\Microsoft.ML.Ensemble.csproj" />
<ProjectReference Include="..\Microsoft.ML.FastTree\Microsoft.ML.FastTree.csproj" />
<ProjectReference Include="..\Microsoft.ML.InternalStreams\Microsoft.ML.InternalStreams.csproj" />
<ProjectReference Include="..\Microsoft.ML.KMeansClustering\Microsoft.ML.KMeansClustering.csproj" />
<ProjectReference Include="..\Microsoft.ML.LightGBM\Microsoft.ML.LightGBM.csproj" />
<ProjectReference Include="..\Microsoft.ML.Maml\Microsoft.ML.Maml.csproj" />
<ProjectReference Include="..\Microsoft.ML.PCA\Microsoft.ML.PCA.csproj" />
<ProjectReference Include="..\Microsoft.ML.PipelineInference\Microsoft.ML.PipelineInference.csproj" />
</ItemGroup>
<ProjectReference Include="..\Microsoft.ML.ResultProcessor\Microsoft.ML.ResultProcessor.csproj" />
<ProjectReference Include="..\Microsoft.ML.StandardLearners\Microsoft.ML.StandardLearners.csproj" />
<ProjectReference Include="..\Microsoft.ML.Sweeper\Microsoft.ML.Sweeper.csproj" />
<ProjectReference Include="..\Microsoft.ML.Transforms\Microsoft.ML.Transforms.csproj" />
<ProjectReference Include="..\Microsoft.ML.UniversalModelFormat\Microsoft.ML.UniversalModelFormat.csproj" />

<NativeAssemblyReference Include="FastTreeNative" />
<NativeAssemblyReference Include="CpuMathNative" />
<NativeAssemblyReference Include="FactorizationMachineNative" />
Copy link
Member

@eerhardt eerhardt Jun 29, 2018

Choose a reason for hiding this comment

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

Copy link
Member Author

@codemzs codemzs Jun 29, 2018

Choose a reason for hiding this comment

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

Good catch. We will need that if someone uses that via command line.


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

</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Microsoft.ML.LightGBM/LightGbmBinaryTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static partial class LightGbm
{
[TlcModule.EntryPoint(
Name = "Trainers.LightGbmBinaryClassifier",
Desc = "Train an LightGBM binary class model",
Desc = "Train a LightGBM binary class model. This API requires Microsoft.ML.LightGBM nuget.",
UserName = LightGbmBinaryTrainer.Summary,
ShortName = LightGbmBinaryTrainer.ShortName)]
public static CommonOutputs.BinaryClassificationOutput TrainBinary(IHostEnvironment env, LightGbmArguments input)
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.ML.LightGBM/LightGbmMulticlassTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public static partial class LightGbm
{
[TlcModule.EntryPoint(
Name = "Trainers.LightGbmClassifier",
Desc = "Train an LightGBM multi class model",
Desc = "Train a LightGBM multi class model. This API requires Microsoft.ML.LightGBM nuget.",
UserName = LightGbmMulticlassTrainer.Summary,
ShortName = LightGbmMulticlassTrainer.ShortName)]
public static CommonOutputs.MulticlassClassificationOutput TrainMultiClass(IHostEnvironment env, LightGbmArguments input)
Expand Down
6 changes: 5 additions & 1 deletion src/Microsoft.ML.LightGBM/LightGbmRankingTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ protected override void CheckAndUpdateParametersBeforeTraining(IChannel ch, Role
/// </summary>
public static partial class LightGbm
{
[TlcModule.EntryPoint(Name = "Trainers.LightGbmRanker", Desc = "Train an LightGBM ranking model", UserName = LightGbmRankingTrainer.Summary, ShortName = LightGbmRankingTrainer.ShortName)]
[TlcModule.EntryPoint(
Name = "Trainers.LightGbmRanker",
Desc = "Train a LightGBM ranking model. This API requires Microsoft.ML.LightGBM nuget.",
Copy link
Contributor

@TomFinley TomFinley Jun 29, 2018

Choose a reason for hiding this comment

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

requires Microsoft.ML.LightGBM nuget [](start = 61, length = 36)

Entry-points are not just for the C# API. (Indeed, in a few months they won't be for the C# API at all.) This description will also show up in the other language bindings. This note is specific to .NET, so it does not belong here.

Rather, you must make the change in the C# API itself. Exploit the fact that these are partial classes. If you must put, the specific logic in the C# API generator. This is not the right place for it. #Resolved

UserName = LightGbmRankingTrainer.Summary,
ShortName = LightGbmRankingTrainer.ShortName)]
public static CommonOutputs.RankingOutput TrainRanking(IHostEnvironment env, LightGbmArguments input)
{
Contracts.CheckValue(env, nameof(env));
Expand Down
6 changes: 5 additions & 1 deletion src/Microsoft.ML.LightGBM/LightGbmRegressionTrainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ protected override void CheckAndUpdateParametersBeforeTraining(IChannel ch, Role
/// </summary>
public static partial class LightGbm
{
[TlcModule.EntryPoint(Name = "Trainers.LightGbmRegressor", Desc = LightGbmRegressorTrainer.Summary, UserName = LightGbmRegressorTrainer.UserNameValue, ShortName = LightGbmRegressorTrainer.ShortName)]
[TlcModule.EntryPoint(
Name = "Trainers.LightGbmRegressor",
Desc = LightGbmRegressorTrainer.Summary + ". This API requires Microsoft.ML.LightGBM nuget.",
Copy link
Contributor

@TomFinley TomFinley Jun 29, 2018

Choose a reason for hiding this comment

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

This API requires Microsoft.ML.LightGBM nuget.", [](start = 57, length = 48)

Same comment. #Resolved

UserName = LightGbmRegressorTrainer.UserNameValue,
ShortName = LightGbmRegressorTrainer.ShortName)]
public static CommonOutputs.RegressionOutput TrainRegression(IHostEnvironment env, LightGbmArguments input)
{
Contracts.CheckValue(env, nameof(env));
Expand Down
8 changes: 4 additions & 4 deletions src/Microsoft.ML/CSharpApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7310,7 +7310,7 @@ public enum LightGbmArgumentsEvalMetricType


/// <summary>
/// Train an LightGBM binary class model
/// Train a LightGBM binary class model. This API requires Microsoft.ML.LightGBM nuget.
/// </summary>
public sealed partial class LightGbmBinaryClassifier : Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithGroupId, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithWeight, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithLabel, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInput, Microsoft.ML.ILearningPipelineItem
{
Expand Down Expand Up @@ -7515,7 +7515,7 @@ namespace Trainers
{

/// <summary>
/// Train an LightGBM multi class model
/// Train a LightGBM multi class model. This API requires Microsoft.ML.LightGBM nuget.
/// </summary>
public sealed partial class LightGbmClassifier : Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithGroupId, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithWeight, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithLabel, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInput, Microsoft.ML.ILearningPipelineItem
{
Expand Down Expand Up @@ -7720,7 +7720,7 @@ namespace Trainers
{

/// <summary>
/// Train an LightGBM ranking model
/// Train a LightGBM ranking model. This API requires Microsoft.ML.LightGBM nuget.
/// </summary>
public sealed partial class LightGbmRanker : Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithGroupId, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithWeight, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithLabel, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInput, Microsoft.ML.ILearningPipelineItem
{
Expand Down Expand Up @@ -7925,7 +7925,7 @@ namespace Trainers
{

/// <summary>
/// LightGBM Regression
/// LightGBM Regression. This API requires Microsoft.ML.LightGBM nuget.
/// </summary>
public sealed partial class LightGbmRegressor : Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithGroupId, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithWeight, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithLabel, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInput, Microsoft.ML.ILearningPipelineItem
{
Expand Down
4 changes: 4 additions & 0 deletions test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ Trainers.FieldAwareFactorizationMachineBinaryClassifier Train a field-aware fact
Trainers.GeneralizedAdditiveModelBinaryClassifier Trains a gradient boosted stump per feature, on all features simultaneously, to fit target values using least-squares. It mantains no interactions between features. Microsoft.ML.Runtime.FastTree.Gam TrainBinary Microsoft.ML.Runtime.FastTree.BinaryClassificationGamTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput
Trainers.GeneralizedAdditiveModelRegressor Trains a gradient boosted stump per feature, on all features simultaneously, to fit target values using least-squares. It mantains no interactions between features. Microsoft.ML.Runtime.FastTree.Gam TrainRegression Microsoft.ML.Runtime.FastTree.RegressionGamTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+RegressionOutput
Trainers.KMeansPlusPlusClusterer K-means is a popular clustering algorithm. With K-means, the data is clustered into a specified number of clusters in order to minimize the within-cluster sum of squares. K-means++ improves upon K-means by using a better method for choosing the initial cluster centers. Microsoft.ML.Runtime.KMeans.KMeansPlusPlusTrainer TrainKMeans Microsoft.ML.Runtime.KMeans.KMeansPlusPlusTrainer+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+ClusteringOutput
Trainers.LightGbmBinaryClassifier Train a LightGBM binary class model. This API requires Microsoft.ML.LightGBM nuget. Microsoft.ML.Runtime.LightGBM.LightGbm TrainBinary Microsoft.ML.Runtime.LightGBM.LightGbmArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput
Trainers.LightGbmClassifier Train a LightGBM multi class model. This API requires Microsoft.ML.LightGBM nuget. Microsoft.ML.Runtime.LightGBM.LightGbm TrainMultiClass Microsoft.ML.Runtime.LightGBM.LightGbmArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MulticlassClassificationOutput
Trainers.LightGbmRanker Train a LightGBM ranking model. This API requires Microsoft.ML.LightGBM nuget. Microsoft.ML.Runtime.LightGBM.LightGbm TrainRanking Microsoft.ML.Runtime.LightGBM.LightGbmArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+RankingOutput
Trainers.LightGbmRegressor LightGBM Regression. This API requires Microsoft.ML.LightGBM nuget. Microsoft.ML.Runtime.LightGBM.LightGbm TrainRegression Microsoft.ML.Runtime.LightGBM.LightGbmArguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+RegressionOutput
Trainers.LinearSvmBinaryClassifier Train a linear SVM. Microsoft.ML.Runtime.Learners.LinearSvm TrainLinearSvm Microsoft.ML.Runtime.Learners.LinearSvm+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput
Trainers.LogisticRegressionBinaryClassifier Train a logistic regression binary model Microsoft.ML.Runtime.Learners.LogisticRegression TrainBinary Microsoft.ML.Runtime.Learners.LogisticRegression+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput
Trainers.LogisticRegressionClassifier Train a logistic regression multi class model Microsoft.ML.Runtime.Learners.LogisticRegression TrainMultiClass Microsoft.ML.Runtime.Learners.MulticlassLogisticRegression+Arguments Microsoft.ML.Runtime.EntryPoints.CommonOutputs+MulticlassClassificationOutput
Expand Down
Loading