From 5a705ba38e9f6966478036150289b66a2a403677 Mon Sep 17 00:00:00 2001 From: Xiaoyun Zhang Date: Mon, 29 Jul 2019 14:31:35 -0700 Subject: [PATCH] update based on comment --- Microsoft.ML.AutoML.sln | 4 +- src/Microsoft.ML.AutoML/Assembly.cs | 3 +- .../CodeGenerator/CSharp/CodeGenerator.cs | 2 +- .../CSharp/CodeGeneratorSettings.cs | 5 +- .../Microsoft.ML.CodeGen.csproj | 36 ++---- .../Templates/Console/ModelBuilder.cs | 2 +- .../Templates/Console/ModelInputClass.cs | 8 +- .../Templates/Console/ModelOutputClass.cs | 8 +- .../Templates/Console/ModelProject.cs | 8 +- .../Templates/Console/PredictProgram.cs | 8 +- .../Templates/Console/PredictProgram.tt | 2 +- .../Templates/Console/PredictProject.cs | 8 +- src/Microsoft.ML.CodeGen/mlnet.csproj | 112 ------------------ .../CodeGenerator/CodeGenerationHelper.cs | 1 - src/mlnet/Commands/CommandDefinitions.cs | 1 - 15 files changed, 39 insertions(+), 169 deletions(-) delete mode 100644 src/Microsoft.ML.CodeGen/mlnet.csproj diff --git a/Microsoft.ML.AutoML.sln b/Microsoft.ML.AutoML.sln index d0063a65286..2bab1eae98a 100644 --- a/Microsoft.ML.AutoML.sln +++ b/Microsoft.ML.AutoML.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.28902.138 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2050 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.AutoML", "src\Microsoft.ML.AutoML\Microsoft.ML.AutoML.csproj", "{B3727729-3DF8-47E0-8710-9B41DAF55817}" EndProject diff --git a/src/Microsoft.ML.AutoML/Assembly.cs b/src/Microsoft.ML.AutoML/Assembly.cs index aad0102e2d4..3415c4013d3 100644 --- a/src/Microsoft.ML.AutoML/Assembly.cs +++ b/src/Microsoft.ML.AutoML/Assembly.cs @@ -8,4 +8,5 @@ [assembly: InternalsVisibleTo("mlnet, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] [assembly: InternalsVisibleTo("mlnet.Tests, PublicKey=002400000480000094000000060200000024000052534131000400000100010015c01ae1f50e8cc09ba9eac9147cf8fd9fce2cfe9f8dce4f7301c4132ca9fb50ce8cbf1df4dc18dd4d210e4345c744ecb3365ed327efdbc52603faa5e21daa11234c8c4a73e51f03bf192544581ebe107adee3a34928e39d04e524a9ce729d5090bfd7dad9d10c722c0def9ccc08ff0a03790e48bcd1f9b6c476063e1966a1c4")] [assembly: InternalsVisibleTo("Benchmark, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] -[assembly: InternalsVisibleTo("Microsoft.ML.CodeGen, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] \ No newline at end of file +[assembly: InternalsVisibleTo("Microsoft.ML.CodeGen, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")] +[assembly: InternalsVisibleTo("Microsoft.ML.ModelBuilder, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")] \ No newline at end of file diff --git a/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGenerator.cs b/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGenerator.cs index 12692d76946..ab43aa592a0 100644 --- a/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGenerator.cs +++ b/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGenerator.cs @@ -9,7 +9,7 @@ using System.Text; using Microsoft.CodeAnalysis; using Microsoft.ML.AutoML; -using Microsoft.ML.CLI.Templates.Console; +using Microsoft.ML.CodeGen.Templates.Console; using Microsoft.ML.CodeGen.Utilities; namespace Microsoft.ML.CodeGen.CSharp diff --git a/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGeneratorSettings.cs b/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGeneratorSettings.cs index a6eda27f46a..3b7c65870bf 100644 --- a/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGeneratorSettings.cs +++ b/src/Microsoft.ML.CodeGen/CodeGenerator/CSharp/CodeGeneratorSettings.cs @@ -1,4 +1,7 @@ -using Microsoft.ML.AutoML; +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. +using Microsoft.ML.AutoML; namespace Microsoft.ML.CodeGen.CSharp { diff --git a/src/Microsoft.ML.CodeGen/Microsoft.ML.CodeGen.csproj b/src/Microsoft.ML.CodeGen/Microsoft.ML.CodeGen.csproj index 9d688b69cd4..418cf2ad43a 100644 --- a/src/Microsoft.ML.CodeGen/Microsoft.ML.CodeGen.csproj +++ b/src/Microsoft.ML.CodeGen/Microsoft.ML.CodeGen.csproj @@ -2,8 +2,8 @@ netstandard2.0 - false - 7.1 + 7.3 + 0.15.0-preview-27912-1 @@ -21,49 +21,29 @@ - TextTemplatingFileGenerator + TextTemplatingFilePreprocessor ModelBuilder.cs - TextTemplatingFileGenerator + TextTemplatingFilePreprocessor ModelInputClass.cs - TextTemplatingFileGenerator + TextTemplatingFilePreprocessor ModelOutputClass.cs - TextTemplatingFileGenerator + TextTemplatingFilePreprocessor ModelProject.cs - TextTemplatingFileGenerator + TextTemplatingFilePreprocessor PredictProgram.cs - TextTemplatingFileGenerator + TextTemplatingFilePreprocessor PredictProject.cs - - TextTemplatingFileGenerator - - - TextTemplatingFileGenerator - ModelInputClass.cs - - - TextTemplatingFileGenerator - ModelOutputClass.cs - - - TextTemplatingFileGenerator - - - TextTemplatingFileGenerator - - - TextTemplatingFileGenerator - diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/ModelBuilder.cs b/src/Microsoft.ML.CodeGen/Templates/Console/ModelBuilder.cs index 2622d3c1401..6194ab9f737 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/ModelBuilder.cs +++ b/src/Microsoft.ML.CodeGen/Templates/Console/ModelBuilder.cs @@ -7,7 +7,7 @@ // the code is regenerated. // // ------------------------------------------------------------------------------ -namespace Microsoft.ML.CLI.Templates.Console +namespace Microsoft.ML.CodeGen.Templates.Console { using System.Linq; using System.Text; diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/ModelInputClass.cs b/src/Microsoft.ML.CodeGen/Templates/Console/ModelInputClass.cs index 6205ffc6838..a07e77caf30 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/ModelInputClass.cs +++ b/src/Microsoft.ML.CodeGen/Templates/Console/ModelInputClass.cs @@ -1,13 +1,13 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 15.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ -namespace Microsoft.ML.CLI.Templates.Console +namespace Microsoft.ML.CodeGen.Templates.Console { using System.Linq; using System.Text; @@ -17,7 +17,7 @@ namespace Microsoft.ML.CLI.Templates.Console /// /// Class to produce the template output /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class ModelInputClass : ModelInputClassBase { /// @@ -53,7 +53,7 @@ namespace "); /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class ModelInputClassBase { #region Fields diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/ModelOutputClass.cs b/src/Microsoft.ML.CodeGen/Templates/Console/ModelOutputClass.cs index 767ae5d0da4..d7bb67b7dff 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/ModelOutputClass.cs +++ b/src/Microsoft.ML.CodeGen/Templates/Console/ModelOutputClass.cs @@ -1,13 +1,13 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 15.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ -namespace Microsoft.ML.CLI.Templates.Console +namespace Microsoft.ML.CodeGen.Templates.Console { using System.Linq; using System.Text; @@ -17,7 +17,7 @@ namespace Microsoft.ML.CLI.Templates.Console /// /// Class to produce the template output /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class ModelOutputClass : ModelOutputClassBase { /// @@ -66,7 +66,7 @@ namespace "); /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class ModelOutputClassBase { #region Fields diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/ModelProject.cs b/src/Microsoft.ML.CodeGen/Templates/Console/ModelProject.cs index be2afa2eade..1d0771946b6 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/ModelProject.cs +++ b/src/Microsoft.ML.CodeGen/Templates/Console/ModelProject.cs @@ -1,13 +1,13 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 15.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ -namespace Microsoft.ML.CLI.Templates.Console +namespace Microsoft.ML.CodeGen.Templates.Console { using System.Linq; using System.Text; @@ -17,7 +17,7 @@ namespace Microsoft.ML.CLI.Templates.Console /// /// Class to produce the template output /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class ModelProject : ModelProjectBase { /// @@ -52,7 +52,7 @@ public virtual string TransformText() /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class ModelProjectBase { #region Fields diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.cs b/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.cs index 7bbe75d0481..93df4925219 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.cs +++ b/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.cs @@ -1,13 +1,13 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 15.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ -namespace Microsoft.ML.CLI.Templates.Console +namespace Microsoft.ML.CodeGen.Templates.Console { using System.Linq; using System.Text; @@ -19,7 +19,7 @@ namespace Microsoft.ML.CLI.Templates.Console /// /// Class to produce the template output /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class PredictProgram : PredictProgramBase { /// @@ -143,7 +143,7 @@ public static string GetAbsolutePath(string relativePath) /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class PredictProgramBase { #region Fields diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.tt b/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.tt index 8a2c3b502b9..292c9c60467 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.tt +++ b/src/Microsoft.ML.CodeGen/Templates/Console/PredictProgram.tt @@ -4,7 +4,7 @@ <#@ import namespace="System.Text" #> <#@ import namespace="System.Text.RegularExpressions" #> <#@ import namespace="System.Collections.Generic" #> -<#@ import namespace="Microsoft.ML.CLI.Utilities" #> +<#@ import namespace="Microsoft.ML.CodeGen.Utilities" #> //***************************************************************************************** //* * //* This is an auto-generated file by Microsoft ML.NET CLI (Command-Line Interface) tool. * diff --git a/src/Microsoft.ML.CodeGen/Templates/Console/PredictProject.cs b/src/Microsoft.ML.CodeGen/Templates/Console/PredictProject.cs index 527b1ae22d4..cdcb4d8ffc0 100644 --- a/src/Microsoft.ML.CodeGen/Templates/Console/PredictProject.cs +++ b/src/Microsoft.ML.CodeGen/Templates/Console/PredictProject.cs @@ -1,13 +1,13 @@ // ------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version: 15.0.0.0 +// Runtime Version: 16.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ -namespace Microsoft.ML.CLI.Templates.Console +namespace Microsoft.ML.CodeGen.Templates.Console { using System.Linq; using System.Text; @@ -18,7 +18,7 @@ namespace Microsoft.ML.CLI.Templates.Console /// /// Class to produce the template output /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public partial class PredictProject : PredictProjectBase { /// @@ -57,7 +57,7 @@ public virtual string TransformText() /// /// Base class for this transformation /// - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "16.0.0.0")] public class PredictProjectBase { #region Fields diff --git a/src/Microsoft.ML.CodeGen/mlnet.csproj b/src/Microsoft.ML.CodeGen/mlnet.csproj deleted file mode 100644 index c1fb8cc954e..00000000000 --- a/src/Microsoft.ML.CodeGen/mlnet.csproj +++ /dev/null @@ -1,112 +0,0 @@ - - - - Exe - netcoreapp2.1 - Microsoft.ML.CLI - - - - - - - - - - - - - - - - - - - - - - - True - True - Strings.resx - - - True - True - ModelProject.tt - - - True - True - ModelInputClass.tt - - - True - True - ModelOutputClass.tt - - - True - True - PredictProgram.tt - - - True - True - PredictProject.tt - - - True - True - ModelBuilder.tt - - - - - - ResXFileCodeGenerator - Strings.Designer.cs - - - - - - Always - - - TextTemplatingFilePreprocessor - ModelProject.cs - - - TextTemplatingFilePreprocessor - ModelInputClass.cs - - - TextTemplatingFilePreprocessor - ModelOutputClass.cs - - - TextTemplatingFilePreprocessor - PredictProgram.cs - - - TextTemplatingFilePreprocessor - PredictProject.cs - - - TextTemplatingFilePreprocessor - ModelBuilder.cs - - - - - - - - - - - - - - diff --git a/src/mlnet/CodeGenerator/CodeGenerationHelper.cs b/src/mlnet/CodeGenerator/CodeGenerationHelper.cs index 38d1d0e07ea..2a685e672c1 100644 --- a/src/mlnet/CodeGenerator/CodeGenerationHelper.cs +++ b/src/mlnet/CodeGenerator/CodeGenerationHelper.cs @@ -13,7 +13,6 @@ using Microsoft.ML.CLI.ShellProgressBar; using Microsoft.ML.CLI.Telemetry.Events; using Microsoft.ML.CLI.Utilities; -using Microsoft.ML.CodeGen; using Microsoft.ML.Data; using NLog; diff --git a/src/mlnet/Commands/CommandDefinitions.cs b/src/mlnet/Commands/CommandDefinitions.cs index 2dc34613288..506ff0bd68f 100644 --- a/src/mlnet/Commands/CommandDefinitions.cs +++ b/src/mlnet/Commands/CommandDefinitions.cs @@ -9,7 +9,6 @@ using System.CommandLine.Invocation; using System.IO; using System.Linq; - namespace Microsoft.ML.CLI.Commands { internal static class CommandDefinitions