Generate built-in SweepableEstimator classes for all available estimators - #6125
Merged
michaelgsharp merged 17 commits intoMar 28, 2022
Merged
Conversation
| public void CreateMultiModelPipelineFromIEstimatorAndRegressors() | ||
| { | ||
| var context = new MLContext(); | ||
| var pipeline = context.Transforms.Concatenate("output", "input") |
Member
Author
There was a problem hiding this comment.
This will be essentially how user create a sweepable pipeline for multi-classification
Codecov Report
@@ Coverage Diff @@
## main #6125 +/- ##
==========================================
+ Coverage 68.29% 68.30% +0.01%
==========================================
Files 1092 1095 +3
Lines 241554 241706 +152
Branches 25150 25152 +2
==========================================
+ Hits 164974 165107 +133
- Misses 70030 70046 +16
- Partials 6550 6553 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
michaelgsharp
approved these changes
Mar 28, 2022
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.
We are excited to review your PR.
So we can do the best job, please check:
Fixes #nnnnin your description to cause GitHub to automatically close the issue(s) when your PR is merged.#5993
What does this PR do
This PR includes a source generator which generates
SweepableEstimatorclass for all built-in estimators that defined in trainer-estimator.json and transformer-estimator.jsonOne example class looks like (kindly notice that the generated class is a partial class, and we manually code the rest of this class)
The other half, which is manually coded, looks like this
Why create this bunch of
SweepableEstimatorclasses instead of just having a factory class for all estimatorsThis is because of
SweepableEstimatorclass includes useful information for modelbuilder to reconstruct source code training pipeline ( such asUsingStatement/NugetDependency)Will those generated classes be internal only
That's the plan, external users will have to use
CreateSweepableEstimatorif they want to create a sweepable estimator.