From cfeaa31af953ebe07647be100d69348e8dec6ab2 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Tue, 15 Oct 2019 09:18:50 -0500 Subject: [PATCH 1/3] Update OnnxRuntime to latest version. OnnxRuntime supports win-x86, so start running tests on the win-x86 leg. --- build/Dependencies.props | 2 +- .../Attributes/OnnxFactAttribute.cs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build/Dependencies.props b/build/Dependencies.props index 39cf7b5312..34fe9dc49a 100644 --- a/build/Dependencies.props +++ b/build/Dependencies.props @@ -16,7 +16,7 @@ 3.5.1 2.2.3 2.1.0 - 0.4.0 + 0.5.1 0.0.0.9 2.1.3 4.5.0 diff --git a/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs b/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs index 150c74decf..c7c75456fb 100644 --- a/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs +++ b/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs @@ -12,14 +12,15 @@ namespace Microsoft.ML.TestFramework.Attributes /// public sealed class OnnxFactAttribute : EnvironmentSpecificFactAttribute { - public OnnxFactAttribute() : base("Onnx is 64-bit Windows only") + public OnnxFactAttribute() : base("Onnx is not supported on Linux with libc < v2.23") { } /// protected override bool IsEnvironmentSupported() { - return Environment.Is64BitProcess && (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23))); + return !RuntimeInformation.IsOSPlatform(OSPlatform.Linux) + || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)); } } } \ No newline at end of file From 5f1091a2313db7c80c2de27a2a1a1d0df158340e Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Tue, 15 Oct 2019 11:33:38 -0500 Subject: [PATCH 2/3] Update README - ONNX is supported on 32-bit. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8742cbcafa..ec6c872cb2 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ There a list of short videos each one focusing on a particular single topic of M ML.NET runs on Windows, Linux, and macOS using [.NET Core](https://github.com/dotnet/core), or Windows using .NET Framework. -64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow, LightGBM, and ONNX related functionality. +64 bit is supported on all platforms. 32 bit is supported on Windows, except for TensorFlow and LightGBM related functionality. ## ML.NET Nuget packages status From 5f8bcba637ef4f6f6382c43228f2aef496321f51 Mon Sep 17 00:00:00 2001 From: Eric Erhardt Date: Tue, 15 Oct 2019 11:42:48 -0500 Subject: [PATCH 3/3] Consolidate "is onnx runtime supported" logic in the tests. --- .../Attributes/OnnxFactAttribute.cs | 7 +++++-- test/Microsoft.ML.Tests/OnnxConversionTest.cs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs b/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs index c7c75456fb..6254f50213 100644 --- a/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs +++ b/test/Microsoft.ML.TestFramework/Attributes/OnnxFactAttribute.cs @@ -19,8 +19,11 @@ public OnnxFactAttribute() : base("Onnx is not supported on Linux with libc < v2 /// protected override bool IsEnvironmentSupported() { - return !RuntimeInformation.IsOSPlatform(OSPlatform.Linux) - || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)); + return IsOnnxRuntimeSupported; } + + public static bool IsOnnxRuntimeSupported { get; } = + !RuntimeInformation.IsOSPlatform(OSPlatform.Linux) + || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new Version(2, 23)); } } \ No newline at end of file diff --git a/test/Microsoft.ML.Tests/OnnxConversionTest.cs b/test/Microsoft.ML.Tests/OnnxConversionTest.cs index 7915e011b5..9e6f9040c4 100644 --- a/test/Microsoft.ML.Tests/OnnxConversionTest.cs +++ b/test/Microsoft.ML.Tests/OnnxConversionTest.cs @@ -43,7 +43,7 @@ public OnnxConversionTest(ITestOutputHelper output) : base(output) private bool IsOnnxRuntimeSupported() { - return Environment.Is64BitProcess && (!RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || AttributeHelpers.CheckLibcVersionGreaterThanMinimum(new System.Version(2, 23))); + return OnnxFactAttribute.IsOnnxRuntimeSupported; } ///