Added onnx export support for OptionalColumnTransform #4454
Merged
harishsk merged 5 commits intodotnet:masterfrom Nov 14, 2019
harishsk:optionalcol2
Merged
Added onnx export support for OptionalColumnTransform #4454harishsk merged 5 commits intodotnet:masterfrom harishsk:optionalcol2
harishsk merged 5 commits intodotnet:masterfrom
harishsk:optionalcol2
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4454 +/- ##
=========================================
Coverage ? 74.74%
=========================================
Files ? 906
Lines ? 159345
Branches ? 17155
=========================================
Hits ? 119097
Misses ? 35445
Partials ? 4803
|
ganik
reviewed
Nov 13, 2019
|
|
||
| // REVIEW: | ||
| // AddInitializer only supports long, float and string. | ||
| // Is it correct to cast double to float and ulong to long? |
Member
There was a problem hiding this comment.
// Is it correct to cast double to float and ulong to long [](start = 11, length = 59)
State this as a known issue for future
…pport OptionalColumnTransform
kere-nel
added a commit
to kere-nel/machinelearning
that referenced
this pull request
Nov 14, 2019
commit a5e274ef8869576190bbb794360a5f56d998b470 Merge: b7db4fa d7f9996 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Nov 14 14:51:21 2019 -0800 Merge branch 'onnx_bin_classifiers' of https://github.com/Lynx1820/machinelearning into onnx_bin_classifiers commit b7db4fa Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 17:41:12 2019 +0000 Added onnx export support for KeyToValueMappingTransformer (dotnet#4455) commit f3e0f6b Author: Eric Erhardt <eric.erhardt@microsoft.com> Date: Thu Nov 14 07:22:12 2019 -0600 Fix a flaky Extensions.ML test. (dotnet#4458) * Fix a flaky Extensions.ML test. Make the reload model tests more resistant to timing changes. * PR feedback. commit c1e190a Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 05:24:14 2019 +0000 Added onnx export support for OptionalColumnTransform (dotnet#4454) * Initial work for adding onnx export support for OptionalColumnTransform * Implemented support for optional initializers in OnnxTranformer to support OptionalColumnTransform * Fixed handling of double values and non-long numeric types * Removed redundant line * Updated review comment commit f96761b Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 03:17:12 2019 +0000 Fixed model saving and loading of OneVersusAllTrainer to include SoftMax (dotnet#4472) * Fixed model saving and loading of OneVersusAllTrainer to include SoftMax * Modified existing test to include SoftMax option * Modified test to verify both cases: when UseSoftmax is true and false commit d45cc8a Author: Jake <31937616+JakeRadMSFT@users.noreply.github.com> Date: Wed Nov 13 17:26:49 2019 -0800 Add InternalsVisibleTo in AutoML and CodeGenerator for the assembly Microsoft.ML.ModelBuilder.AutoMLService.Gpu (dotnet#4474) commit 5e83e23 Author: Eric Erhardt <eric.erhardt@microsoft.com> Date: Wed Nov 13 16:09:05 2019 -0600 CpuMathNative assembly is not getting copied when using packages.config. (dotnet#4465) When we refactored CpuMath to support netcoreapp3.0, we broke the packages.config support to copy the native assembly. This fixes it again by copying the file from the correct location. Fix dotnet#93 commit 693250b Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Wed Nov 13 21:58:07 2019 +0000 Added onnx export support for WordTokenizingTransformer and NgramExtractingTransformer (dotnet#4451) * Added onnx export support for string related transforms * Updated baseline test files A large portion of this commit is upgrading the baseline test files. The rest of the fixes deal with build breaks resulting from the upgrade of ORT version. * Fixed bugs in ValueToKeyMappingTransformer and added additional tests commit 5910910 Author: Antonio Velázquez <38739674+antoniovs1029@users.noreply.github.com> Date: Mon Nov 11 17:19:39 2019 -0800 Fixes dotnet#4292 about using PFI with BPT and CMPB (dotnet#4306) *Changes in PredictionTransformer.cs and Calibrator.cs to fix the problem of the create methods not being called, to make CMP load its internal calibrator and predictor first so to assign the correct paramaters types and runtimes, and added a PredictionTransformerLoadTypeAttribute so that the binary prediction transformer knows what type to assign when loading a CMP as its internal model. *Added a working sample for using PFI with BPT and CMPB while loading a model from disk. This is based entirely in the original sample. *Added file CalibratedModelParametersTests.cs with tests that the CMPs modified in this PR are now being correctly loaded from disk. *Changed a couple of tests in LbfgsTests.cs that failed because they used casts that now return 'null'. commit bcdac55 Author: Brian Stark <54910472+bpstark@users.noreply.github.com> Date: Mon Nov 11 13:42:42 2019 -0800 Stabilize the LR test (dotnet#4446) * Stabilize the LR test Found issue with how we were using random for our ImageClassificationTrainer. This caused instability in our unit test, as we were not able to control the random seed. Modified the code to now use the same random object throughout, the trainer, thus allowing us to control the seed and therefor have predictable output. commit d7f9996 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:33:17 2019 -0800 workaround Scores commit 7fba31c Merge: 93388b6 c96d690 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:25:28 2019 -0800 merging changes commit 93388b6 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:19:59 2019 -0800 Added extraction of score column before node creation commit ea71828 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Fri Nov 8 15:53:11 2019 -0800 fix for binary classification trainers export to onnx commit 6fad293 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:26:43 2019 -0700 Revert "draft regression test" This reverts commit 1ad45c995516b9d39fc05aca855ce2abe96c407b. commit 83c1c80 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:24:23 2019 -0700 draft regression test commit 8884161 Author: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Date: Fri Nov 8 20:20:53 2019 -0800 nightly build pipeline (dotnet#4444) * nightly build pipeline commit c96d690 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Fri Nov 8 15:53:11 2019 -0800 fix for binary classification trainers export to onnx commit 8100364 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:26:43 2019 -0700 Revert "draft regression test" This reverts commit 1ad45c995516b9d39fc05aca855ce2abe96c407b. commit 81381e2 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:24:23 2019 -0700 draft regression test
antoniovs1029
added a commit
to antoniovs1029/machinelearning
that referenced
this pull request
Nov 22, 2019
kere-nel
added a commit
to kere-nel/machinelearning
that referenced
this pull request
Dec 2, 2019
commit a5e274ef8869576190bbb794360a5f56d998b470 Merge: b7db4fa d7f9996 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Nov 14 14:51:21 2019 -0800 Merge branch 'onnx_bin_classifiers' of https://github.com/Lynx1820/machinelearning into onnx_bin_classifiers commit b7db4fa Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 17:41:12 2019 +0000 Added onnx export support for KeyToValueMappingTransformer (dotnet#4455) commit f3e0f6b Author: Eric Erhardt <eric.erhardt@microsoft.com> Date: Thu Nov 14 07:22:12 2019 -0600 Fix a flaky Extensions.ML test. (dotnet#4458) * Fix a flaky Extensions.ML test. Make the reload model tests more resistant to timing changes. * PR feedback. commit c1e190a Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 05:24:14 2019 +0000 Added onnx export support for OptionalColumnTransform (dotnet#4454) * Initial work for adding onnx export support for OptionalColumnTransform * Implemented support for optional initializers in OnnxTranformer to support OptionalColumnTransform * Fixed handling of double values and non-long numeric types * Removed redundant line * Updated review comment commit f96761b Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 03:17:12 2019 +0000 Fixed model saving and loading of OneVersusAllTrainer to include SoftMax (dotnet#4472) * Fixed model saving and loading of OneVersusAllTrainer to include SoftMax * Modified existing test to include SoftMax option * Modified test to verify both cases: when UseSoftmax is true and false commit d45cc8a Author: Jake <31937616+JakeRadMSFT@users.noreply.github.com> Date: Wed Nov 13 17:26:49 2019 -0800 Add InternalsVisibleTo in AutoML and CodeGenerator for the assembly Microsoft.ML.ModelBuilder.AutoMLService.Gpu (dotnet#4474) commit 5e83e23 Author: Eric Erhardt <eric.erhardt@microsoft.com> Date: Wed Nov 13 16:09:05 2019 -0600 CpuMathNative assembly is not getting copied when using packages.config. (dotnet#4465) When we refactored CpuMath to support netcoreapp3.0, we broke the packages.config support to copy the native assembly. This fixes it again by copying the file from the correct location. Fix dotnet#93 commit 693250b Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Wed Nov 13 21:58:07 2019 +0000 Added onnx export support for WordTokenizingTransformer and NgramExtractingTransformer (dotnet#4451) * Added onnx export support for string related transforms * Updated baseline test files A large portion of this commit is upgrading the baseline test files. The rest of the fixes deal with build breaks resulting from the upgrade of ORT version. * Fixed bugs in ValueToKeyMappingTransformer and added additional tests commit 5910910 Author: Antonio Velázquez <38739674+antoniovs1029@users.noreply.github.com> Date: Mon Nov 11 17:19:39 2019 -0800 Fixes dotnet#4292 about using PFI with BPT and CMPB (dotnet#4306) *Changes in PredictionTransformer.cs and Calibrator.cs to fix the problem of the create methods not being called, to make CMP load its internal calibrator and predictor first so to assign the correct paramaters types and runtimes, and added a PredictionTransformerLoadTypeAttribute so that the binary prediction transformer knows what type to assign when loading a CMP as its internal model. *Added a working sample for using PFI with BPT and CMPB while loading a model from disk. This is based entirely in the original sample. *Added file CalibratedModelParametersTests.cs with tests that the CMPs modified in this PR are now being correctly loaded from disk. *Changed a couple of tests in LbfgsTests.cs that failed because they used casts that now return 'null'. commit bcdac55 Author: Brian Stark <54910472+bpstark@users.noreply.github.com> Date: Mon Nov 11 13:42:42 2019 -0800 Stabilize the LR test (dotnet#4446) * Stabilize the LR test Found issue with how we were using random for our ImageClassificationTrainer. This caused instability in our unit test, as we were not able to control the random seed. Modified the code to now use the same random object throughout, the trainer, thus allowing us to control the seed and therefor have predictable output. commit d7f9996 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:33:17 2019 -0800 workaround Scores commit 7fba31c Merge: 93388b6 c96d690 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:25:28 2019 -0800 merging changes commit 93388b6 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:19:59 2019 -0800 Added extraction of score column before node creation commit ea71828 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Fri Nov 8 15:53:11 2019 -0800 fix for binary classification trainers export to onnx commit 6fad293 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:26:43 2019 -0700 Revert "draft regression test" This reverts commit 1ad45c995516b9d39fc05aca855ce2abe96c407b. commit 83c1c80 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:24:23 2019 -0700 draft regression test commit 8884161 Author: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Date: Fri Nov 8 20:20:53 2019 -0800 nightly build pipeline (dotnet#4444) * nightly build pipeline commit c96d690 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Fri Nov 8 15:53:11 2019 -0800 fix for binary classification trainers export to onnx commit 8100364 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:26:43 2019 -0700 Revert "draft regression test" This reverts commit 1ad45c995516b9d39fc05aca855ce2abe96c407b. commit 81381e2 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:24:23 2019 -0700 draft regression test
kere-nel
added a commit
that referenced
this pull request
Dec 2, 2019
* Squashed commit of the following: commit a5e274ef8869576190bbb794360a5f56d998b470 Merge: b7db4fa d7f9996 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Nov 14 14:51:21 2019 -0800 Merge branch 'onnx_bin_classifiers' of https://github.com/Lynx1820/machinelearning into onnx_bin_classifiers commit b7db4fa Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 17:41:12 2019 +0000 Added onnx export support for KeyToValueMappingTransformer (#4455) commit f3e0f6b Author: Eric Erhardt <eric.erhardt@microsoft.com> Date: Thu Nov 14 07:22:12 2019 -0600 Fix a flaky Extensions.ML test. (#4458) * Fix a flaky Extensions.ML test. Make the reload model tests more resistant to timing changes. * PR feedback. commit c1e190a Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 05:24:14 2019 +0000 Added onnx export support for OptionalColumnTransform (#4454) * Initial work for adding onnx export support for OptionalColumnTransform * Implemented support for optional initializers in OnnxTranformer to support OptionalColumnTransform * Fixed handling of double values and non-long numeric types * Removed redundant line * Updated review comment commit f96761b Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Thu Nov 14 03:17:12 2019 +0000 Fixed model saving and loading of OneVersusAllTrainer to include SoftMax (#4472) * Fixed model saving and loading of OneVersusAllTrainer to include SoftMax * Modified existing test to include SoftMax option * Modified test to verify both cases: when UseSoftmax is true and false commit d45cc8a Author: Jake <31937616+JakeRadMSFT@users.noreply.github.com> Date: Wed Nov 13 17:26:49 2019 -0800 Add InternalsVisibleTo in AutoML and CodeGenerator for the assembly Microsoft.ML.ModelBuilder.AutoMLService.Gpu (#4474) commit 5e83e23 Author: Eric Erhardt <eric.erhardt@microsoft.com> Date: Wed Nov 13 16:09:05 2019 -0600 CpuMathNative assembly is not getting copied when using packages.config. (#4465) When we refactored CpuMath to support netcoreapp3.0, we broke the packages.config support to copy the native assembly. This fixes it again by copying the file from the correct location. Fix #93 commit 693250b Author: Harish Kulkarni <harishsk@users.noreply.github.com> Date: Wed Nov 13 21:58:07 2019 +0000 Added onnx export support for WordTokenizingTransformer and NgramExtractingTransformer (#4451) * Added onnx export support for string related transforms * Updated baseline test files A large portion of this commit is upgrading the baseline test files. The rest of the fixes deal with build breaks resulting from the upgrade of ORT version. * Fixed bugs in ValueToKeyMappingTransformer and added additional tests commit 5910910 Author: Antonio Velázquez <38739674+antoniovs1029@users.noreply.github.com> Date: Mon Nov 11 17:19:39 2019 -0800 Fixes #4292 about using PFI with BPT and CMPB (#4306) *Changes in PredictionTransformer.cs and Calibrator.cs to fix the problem of the create methods not being called, to make CMP load its internal calibrator and predictor first so to assign the correct paramaters types and runtimes, and added a PredictionTransformerLoadTypeAttribute so that the binary prediction transformer knows what type to assign when loading a CMP as its internal model. *Added a working sample for using PFI with BPT and CMPB while loading a model from disk. This is based entirely in the original sample. *Added file CalibratedModelParametersTests.cs with tests that the CMPs modified in this PR are now being correctly loaded from disk. *Changed a couple of tests in LbfgsTests.cs that failed because they used casts that now return 'null'. commit bcdac55 Author: Brian Stark <54910472+bpstark@users.noreply.github.com> Date: Mon Nov 11 13:42:42 2019 -0800 Stabilize the LR test (#4446) * Stabilize the LR test Found issue with how we were using random for our ImageClassificationTrainer. This caused instability in our unit test, as we were not able to control the random seed. Modified the code to now use the same random object throughout, the trainer, thus allowing us to control the seed and therefor have predictable output. commit d7f9996 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:33:17 2019 -0800 workaround Scores commit 7fba31c Merge: 93388b6 c96d690 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:25:28 2019 -0800 merging changes commit 93388b6 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Mon Nov 11 11:19:59 2019 -0800 Added extraction of score column before node creation commit ea71828 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Fri Nov 8 15:53:11 2019 -0800 fix for binary classification trainers export to onnx commit 6fad293 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:26:43 2019 -0700 Revert "draft regression test" This reverts commit 1ad45c995516b9d39fc05aca855ce2abe96c407b. commit 83c1c80 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:24:23 2019 -0700 draft regression test commit 8884161 Author: frank-dong-ms <55860649+frank-dong-ms@users.noreply.github.com> Date: Fri Nov 8 20:20:53 2019 -0800 nightly build pipeline (#4444) * nightly build pipeline commit c96d690 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Fri Nov 8 15:53:11 2019 -0800 fix for binary classification trainers export to onnx commit 8100364 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:26:43 2019 -0700 Revert "draft regression test" This reverts commit 1ad45c995516b9d39fc05aca855ce2abe96c407b. commit 81381e2 Author: Keren Fuentes <dkeren@seas.upenn.edu> Date: Thu Oct 31 15:24:23 2019 -0700 draft regression test * update name and remove some dependency code * baseline file changes * Refactored function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Optional columns in ML.NET are supported through initializers in Onnx runtime, support for which was added in the v1 release of ORT. This PR adds support for integrating initializers in ML.NET and adding the corresponding OptionalColumnTransform support in ML.NET.