From af9e6c17e25687dcc5a5785a76cb7864523b39fd Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Fri, 4 Dec 2020 13:43:22 -0800 Subject: [PATCH 1/4] Use onnx prerelease --- NuGet.config | 1 + eng/Versions.props | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NuGet.config b/NuGet.config index 48ce3bd5ca..07d2daf6d1 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,6 +14,7 @@ + diff --git a/eng/Versions.props b/eng/Versions.props index 1571f4a3ac..e37af1c4d6 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,7 +23,7 @@ 3.10.1 2.2.3 2.1.0 - 1.5.2 + 1.5.2-dev-20201204-0513-14f6eb14 0.0.0.9 2.1.3 4.5.0 From 04fbafc8c0ccd01e2cf5d4bd23f525153c532150 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Thu, 10 Dec 2020 16:14:58 -0800 Subject: [PATCH 2/4] Upgrade to onnx 1.6.0 --- NuGet.config | 1 - eng/Versions.props | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/NuGet.config b/NuGet.config index 07d2daf6d1..48ce3bd5ca 100644 --- a/NuGet.config +++ b/NuGet.config @@ -14,7 +14,6 @@ - diff --git a/eng/Versions.props b/eng/Versions.props index e37af1c4d6..a8c06ca334 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -23,7 +23,7 @@ 3.10.1 2.2.3 2.1.0 - 1.5.2-dev-20201204-0513-14f6eb14 + 1.6.0 0.0.0.9 2.1.3 4.5.0 From 53293869dea84faa7fa23e95b411e0d11ca499b1 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Thu, 10 Dec 2020 16:19:53 -0800 Subject: [PATCH 3/4] Updated docs --- src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs b/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs index 9932019e7a..0d9a030dd0 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxTransform.cs @@ -765,7 +765,7 @@ public NamedOnnxValue GetNamedOnnxValue() /// | Does this estimator need to look at the data to train its parameters? | No | /// | Input column data type | Known-sized vector of or types | /// | Output column data type | As specified by the ONNX model | - /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.5.2 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.5.2 (for GPU processing if GPU is available) | + /// | Required NuGet in addition to Microsoft.ML | Microsoft.ML.OnnxTransformer (always), either Microsoft.ML.OnnxRuntime 1.6.0 (for CPU processing) or Microsoft.ML.OnnxRuntime.Gpu 1.6.0 (for GPU processing if GPU is available) | /// | Exportable to ONNX | No | /// /// To create this estimator use the following APIs: From 409893de0047bd1377f86145874bb15807cef8f3 Mon Sep 17 00:00:00 2001 From: Antonio Velazquez Date: Fri, 11 Dec 2020 11:48:41 -0800 Subject: [PATCH 4/4] Fixed problem with sequences --- src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs b/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs index f2b4a943d1..1a2b1420e4 100644 --- a/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs +++ b/src/Microsoft.ML.OnnxTransformer/OnnxTypeParser.cs @@ -267,7 +267,13 @@ private class CastHelper public static IEnumerable CastOnnxSequenceToIEnumerable(IEnumerable o, Func caster) { - return o.Select(v => (TDst)caster(v)); + // Since now we're disposing the NamedOnnxValue objects + // after running inference on each output, we need + // to copy (enumerate) the output through ".ToList()" + // else, if our users try the keep the past sequence + // outputs of their OnnxTransformer, they would + // end up with empty sequences. + return o.Select(v => (TDst)caster(v)).ToList(); } }