-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add Code Gen piece for Recommendation task #4360
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,13 @@ | |
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.ML" Version="$(MlDotNetPackageVersion)" /> | ||
<PackageReference Include="Microsoft.ML.LightGBM" Version="$(MlDotNetPackageVersion)" /> | ||
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="$(MlDotNetPackageVersion)" /> | ||
<PackageReference Include="Microsoft.ML.Recommender" Version="$(MlDotNetPackageVersion)" /> | ||
<PackageReference Include="Microsoft.ML" Version="1.4.0-preview3-28218-2" /> | ||
<PackageReference Include="Microsoft.ML.LightGBM" Version="1.4.0-preview3-28218-2" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. note: LightGbm in all uppercasing is also in nupkgproj files (pkg..AutoML and pkg\mlnet) |
||
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="1.4.0-preview3-28218-2" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why aren't you using a |
||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -556,5 +556,35 @@ public override string[] GenerateUsings() | |
return _binaryTrainerUsings; | ||
} | ||
} | ||
|
||
internal class MatrixFactorization : TrainerGeneratorBase | ||
{ | ||
//ClassName of the trainer | ||
internal override string MethodName => "MatrixFactorization"; | ||
|
||
internal override string OptionsName => "MatrixFactorizationTrainer.Options"; | ||
|
||
//The named parameters to the trainer. | ||
internal override IDictionary<string, string> NamedParameters | ||
{ | ||
get | ||
{ | ||
return | ||
new Dictionary<string, string>() | ||
{ | ||
{"MatrixColumnIndexColumnName","matrixColumnIndexColumnName" }, | ||
{"MatrixRowIndexColumnName","matrixRowIndexColumnName" }, | ||
{"FeatureColumnName","featureColumnName" }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a |
||
{"LabelColumnName","labelColumnName" } | ||
}; | ||
} | ||
} | ||
|
||
internal override string[] Usings => new string[] { "using Microsoft.ML.Trainers;\r\n" }; | ||
|
||
public MatrixFactorization(PipelineNode node) : base(node) | ||
{ | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.CodeAnalysis" Version="2.10.0" /> | ||
<!--<PackageReference Include="Microsoft.ML.AutoML" Version="0.16.0-preview3-28218-2" />--> | ||
<PackageReference Include="Microsoft.ML" Version="1.4.0-preview3-28218-2" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we need Please remove comment BTW |
||
|
||
<PackageReference Include="NLog" Version="4.5.11" /> | ||
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.9.1" /> | ||
<PackageReference Include="Microsoft.DotNet.PlatformAbstractions" Version="2.1.0" /> | ||
|
@@ -15,98 +18,10 @@ | |
<ItemGroup> | ||
<ProjectReference Include="..\Microsoft.ML.AutoML\Microsoft.ML.AutoML.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think you want these to be removed, do you? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bringing back There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why we remove tt file in this case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bringing back |
||
<None Update="Templates\Console\Annotation.tt"> | ||
<Generator>TextTemplatingFileGenerator</Generator> | ||
<LastGenOutput>Annotation.txt</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\Annotation.txt"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>Annotation.tt</DependentUpon> | ||
</None> | ||
<None Update="Templates\Console\ConsumeModel.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>ConsumeModel.cs</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\ModelBuilder.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>ModelBuilder.cs</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\ModelInputClass.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>ModelInputClass.cs</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\ModelOutputClass.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>ModelOutputClass.cs</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\ModelProject.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>ModelProject.cs</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\PredictProgram.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>PredictProgram.cs</LastGenOutput> | ||
</None> | ||
<None Update="Templates\Console\PredictProject.tt"> | ||
<Generator>TextTemplatingFilePreprocessor</Generator> | ||
<LastGenOutput>PredictProject.cs</LastGenOutput> | ||
</None> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Compile Update="Templates\Console\ConsumeModel.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ConsumeModel.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Console\ModelBuilder.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ModelBuilder.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Console\ModelInputClass.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ModelInputClass.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Console\ModelOutputClass.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ModelOutputClass.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Console\ModelProject.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ModelProject.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Console\PredictProgram.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>PredictProgram.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Console\PredictProject.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>PredictProject.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Templates\Console\ModelInputClass.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ModelInputClass.tt</DependentUpon> | ||
</Compile> | ||
<Compile Update="Templates\Templates\Console\ModelOutputClass.cs"> | ||
<DesignTime>True</DesignTime> | ||
<AutoGen>True</AutoGen> | ||
<DependentUpon>ModelOutputClass.tt</DependentUpon> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<Import Project="..\mlnet\mlnet.Build.props" /> | ||
|
||
|
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.
shouldn't it be
LightGbm
?