- Notifications
You must be signed in to change notification settings - Fork 1.9k
Adds CodeGen to master (from features/automl) #4365
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
test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj Outdated Show resolved Hide resolved
test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj Outdated Show resolved Hide resolved
test/Microsoft.ML.CodeGenerator.Tests/Microsoft.ML.CodeGenerator.Tests.csproj Outdated Show resolved Hide resolved
src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj Outdated Show resolved Hide resolved
src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj Outdated Show resolved Hide resolved
src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj Outdated Show resolved Hide resolved
src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGenerator.cs Outdated Show resolved Hide resolved
We should put a Refers to: src/Microsoft.ML.CodeGenerator/Templates/Console/ConsumeModel.tt:1 in a98fa15. [](commit_id = a98fa15, deletion_comment = False) |
src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGeneratorSettings.cs Outdated Show resolved Hide resolved
| I'm looking at this comment: #4365 (comment) Update: addressed in 2f894f4 |
| {#> | ||
| //***************************************************************************************** | ||
| //* * | ||
| //* This is an auto-generated file by Microsoft ML.NET CLI (Command-Line Interface) tool. * |
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.
<auto-generated/> comment, which means code style analyzer diagnostics will be reported in the file even though it is generated.
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.
My thinking is that these code files aren't true "auto generated" files. I expect users to update them. Especially considering that we are putting hard-coded paths in some of the files, and we are making public types, that I assume most users will want to make internal. Or, if they do want them to be public - they would want to put XML docs on them.
So what is the appropriate pattern here? I think it is similar to "scaffolding" in ASP.NET. Or even "Add -> new Item" in VS. Do they put any "this was generated" comments at the top there?
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 this case, the ideal header would be more like a template, with links explaining what the file is and where to find documentation of expected changes users would need to make. You would not need the <auto-generated/> comment for templates (one-time code generation).
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.
@maryamariyan - can you log an issue to address this? I think we should make that change separately and we will need @JakeRadMSFT @LittleLittleCloud and @rustd input as well.
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.
Created #4387
| <#+ | ||
| void MB_Annotation() | ||
| {#> | ||
| // This file was auto-generated by ML.NET Model Builder. |
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.
<auto-generated/> comment, which means diagnostics will be reported in the file even though it is generated.
src/Microsoft.ML.CodeGenerator/Templates/Console/PredictProject.cs Outdated Show resolved Hide resolved
src/Microsoft.ML.CodeGenerator/CodeGenerator/CSharp/CodeGeneratorSettings.cs Outdated Show resolved Hide resolved
eerhardt left a comment
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 this change is ready to be merged.
We can address @sharwell's concern in a follow-up change. But let's not let that block us from moving this code from features/automl into the master branch. It is an existing issue in the code, and there isn't a clear direction we should take on it right now.
Codecov Report
@@ Coverage Diff @@ ## master #4365 +/- ## ========================================== + Coverage 74.65% 74.65% +<.01% ========================================== Files 883 903 +20 Lines 155117 158562 +3445 Branches 16931 17136 +205 ========================================== + Hits 115795 118378 +2583 - Misses 34572 35362 +790 - Partials 4750 4822 +72
|
src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj Outdated Show resolved Hide resolved
src/Microsoft.ML.CodeGenerator/Microsoft.ML.CodeGenerator.csproj Outdated Show resolved Hide resolved
1f9fd65 to 0f5e059 Compare | NOTE: The diff should be the same as you both reviewed. |
justinormont left a comment
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.
LGTM
) All legs are passing except for one which appears to be a random failure and likely will not break the CI. This PR is blocking a few other important PRs that need to be in today hence I'm merging it. Spoke with @eerhardt who also agrees is ok to merge it with one leg still building and all greens.
cc: @eerhardt @LittleLittleCloud