Skip to content

Commit 37176a1

Browse files
authored
Obsolete API (#1686)
* Make most things in Microsoft.ML.Legacy assembly obsolete * Resolve complier warnings by 1. Disable warning 612 reported in test file 2. Remove Microsoft.ML.PipelineInference project 3. Remove two commands used in pipeline inference. - InferRecipesCommand.cs - InferSchemaCommand.cs Note that we add [Obsolete] to everything in Microsoft.ML.Legacy but auto-generated APIs. * More obsolete things. 1. Make everything in CSharpApi.cs obsolete by modifying CSharpApiGenerator.cs and CSharpGeneratorUtils.cs. 2. Some checked-in [Obsolete] are removed because they conflict with those automatically generated in CSharpApi.cs. 3. Some classes in Microsoft.ML.Legacy are still not obsolete so we addd [Obsolete] to them. 4. Supress warnings 612 and 618 (warning 44 for F# test) for tests and benchmarks. * Minor cleaning * Not to load PipelineInference because it no longer exists * New strategy for marking things obsolete 1. Things in Microsoft.ML.Legacy.Runtime are not obsolete. If they reference to obsolete CSharpApi.cs, we supress the warning 612. 2. Things in Microsoft.ML.Legacy have two destinies. Anything (a) referring CSharpApi.c, (b) being a part of CSharpApi.cs, or (c) using ILearningPipelineItem.cs are are obsolete. Otherwise, they are not obsolete. * Update CSharpApi.cs again because rebuilding didn't remove the deleted project's binary files * Address comments
1 parent 71d58fa commit 37176a1

File tree

100 files changed

+3392
-9655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+3392
-9655
lines changed

Microsoft.ML.sln

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Core.Tests", "
1515
EndProject
1616
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.CpuMath", "src\Microsoft.ML.CpuMath\Microsoft.ML.CpuMath.csproj", "{46F2F967-C23F-4076-858D-33F7DA9BD2DA}"
1717
EndProject
18-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.PipelineInference", "src\Microsoft.ML.PipelineInference\Microsoft.ML.PipelineInference.csproj", "{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}"
19-
EndProject
2018
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Data", "src\Microsoft.ML.Data\Microsoft.ML.Data.csproj", "{AD92D96B-0E96-4F22-8DCE-892E13B1F282}"
2119
EndProject
2220
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.Onnx", "src\Microsoft.ML.Onnx\Microsoft.ML.Onnx.csproj", "{65D0603E-B96C-4DFC-BDD1-705891B88C18}"
@@ -165,14 +163,6 @@ Global
165163
{46F2F967-C23F-4076-858D-33F7DA9BD2DA}.Release|Any CPU.Build.0 = Release|Any CPU
166164
{46F2F967-C23F-4076-858D-33F7DA9BD2DA}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
167165
{46F2F967-C23F-4076-858D-33F7DA9BD2DA}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
168-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
169-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Debug|Any CPU.Build.0 = Debug|Any CPU
170-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
171-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Debug-Intrinsics|Any CPU.Build.0 = Debug-Intrinsics|Any CPU
172-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release|Any CPU.ActiveCfg = Release|Any CPU
173-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release|Any CPU.Build.0 = Release|Any CPU
174-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release-Intrinsics|Any CPU.ActiveCfg = Release-Intrinsics|Any CPU
175-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44}.Release-Intrinsics|Any CPU.Build.0 = Release-Intrinsics|Any CPU
176166
{AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
177167
{AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug|Any CPU.Build.0 = Debug|Any CPU
178168
{AD92D96B-0E96-4F22-8DCE-892E13B1F282}.Debug-Intrinsics|Any CPU.ActiveCfg = Debug-Intrinsics|Any CPU
@@ -509,7 +499,6 @@ Global
509499
{A6CA6CC6-5D7C-4D7F-A0F5-35E14B383B0A} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
510500
{EC743D1D-7691-43B7-B9B0-5F2F7018A8F6} = {AED9C836-31E3-4F3F-8ABC-929555D3F3C4}
511501
{46F2F967-C23F-4076-858D-33F7DA9BD2DA} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
512-
{2D7391C9-8254-4B8F-BF26-FADAF8F02F44} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
513502
{AD92D96B-0E96-4F22-8DCE-892E13B1F282} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
514503
{65D0603E-B96C-4DFC-BDD1-705891B88C18} = {09EADF06-BE25-4228-AB53-95AE3E15B530}
515504
{707BB22C-7E5F-497A-8C2F-74578F675705} = {09EADF06-BE25-4228-AB53-95AE3E15B530}

src/Microsoft.ML.Console/Microsoft.ML.Console.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
<ProjectReference Include="..\Microsoft.ML.OnnxTransform\Microsoft.ML.OnnxTransform.csproj" />
2222
<ProjectReference Include="..\Microsoft.ML.Onnx\Microsoft.ML.Onnx.csproj" />
2323
<ProjectReference Include="..\Microsoft.ML.PCA\Microsoft.ML.PCA.csproj" />
24-
<ProjectReference Include="..\Microsoft.ML.PipelineInference\Microsoft.ML.PipelineInference.csproj" />
2524
<ProjectReference Include="..\Microsoft.ML.Recommender\Microsoft.ML.Recommender.csproj" />
2625
<ProjectReference Include="..\Microsoft.ML.ResultProcessor\Microsoft.ML.ResultProcessor.csproj" />
2726
<ProjectReference Include="..\Microsoft.ML.StandardLearners\Microsoft.ML.StandardLearners.csproj" />

src/Microsoft.ML.Legacy/AssemblyRegistration.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,6 @@ private static bool LoadStandardAssemblies()
5151
_ = typeof(OneHotEncodingTransformer).Assembly; // ML.Transforms
5252

5353
// The following assemblies reference this assembly, so we can't directly reference them
54-
55-
//_ = typeof(Microsoft.ML.Runtime.PipelineInference.AutoInference).Assembly); // ML.PipelineInference
56-
_ = Assembly.Load(new AssemblyName()
57-
{
58-
Name = "Microsoft.ML.PipelineInference",
59-
Version = apiAssemblyName.Version, //assume the same version as ML.Api
60-
});
61-
6254
//_ = typeof(Microsoft.ML.Runtime.Data.LinearPredictor).Assembly); // ML.StandardLearners
6355
_ = Assembly.Load(new AssemblyName()
6456
{

0 commit comments

Comments
 (0)