-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Creation of components through MLContext and cleanup (Onnx, Tensorflow, SelectColumn, KeytoBinVec, ValueMap) #2367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b1dfe49
to
50505e3
Compare
Codecov Report
@@ Coverage Diff @@
## master #2367 +/- ##
==========================================
- Coverage 71.22% 71.21% -0.02%
==========================================
Files 785 785
Lines 140977 140954 -23
Branches 16116 16113 -3
==========================================
- Hits 100412 100379 -33
- Misses 36096 36109 +13
+ Partials 4469 4466 -3
|
src/Microsoft.ML.OnnxTransform/Microsoft.ML.OnnxTransform.csproj
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall it looks good to me - I left comments about the CreateKeep/CreateDrop #Resolved |
Thank you very much for reviewing @singlis! I will address your comments. #Resolved |
f202c0f
to
0b1554b
Compare
@@ -29,38 +29,18 @@ | |||
|
|||
namespace Microsoft.ML.Transforms.Conversions | |||
{ | |||
/// <summary> | |||
/// Converts the key types back to binary verctors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verctors [](start = 47, length = 8)
verctors [](start = 47, length = 8)
typeo #Closed
/// <example> | ||
/// <format type="text/markdown"> | ||
/// <] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TensorFlowTransform [](start = 108, length = 19)
TensorFlowTransform [](start = 108, length = 19)
Zeeshan A is trying to rename this file, so be careful
#2429 #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you push your changes? because I still see Dynamic/TensorFlowTransform.cs
instead of TensorFlow/ImageClassification.cs
In reply to: 254515347 [](ancestors = 254515347,254514215,254137918)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sorry I think I did not rebase earlier. I now rebased and pushed again and I see Zeeshan's change now. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still see in line 24 link to /// [!code-csharp[ScoreTensorFlowModel](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/TensorFlowTransform.cs)]
And can you please stop using your rebase magic? Codeflow continue to stay on same iteration, and it get's hard to track which files get changed and which are not?
In reply to: 254547579 [](ancestors = 254547579)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah now I understood what you meant! the links will be broken sorry!! Fixing right away #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok now I think I did what you were saying from the beginning, I didn't understand you were talking about the link. Just pushed a new iteration.
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="modelLocation">Location of the TensorFlow model.</param> | ||
/// <param name="inputColumnName"> The name of the model inputs.</param> | ||
/// <param name="outputColumnName">The name of the requested model outputs.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last word in each sentence is plural. should be singular. input/output instead of inputs/outputs. #Resolved
/// Scores a dataset using a pre-traiend TensorFlow model specified via <paramref name="tensorFlowModel"/>. | ||
/// </summary> | ||
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="tensorFlowModel">The pre-trained TensorFlow model.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pre-trained TensorFlow model. [](start = 42, length = 33)
The pre-trained TensorFlow model. [](start = 42, length = 33)
I would call it pre-loaded instead of pre-trained. They all pre-trained I believe, but this one you load manually in memory, and for other you just pass path to model. #Closed
I would open an issue about it and discuss there if you want to change it In reply to: 461162002 [](ancestors = 461162002) Refers to: src/Microsoft.ML.Data/Transforms/ConversionsExtensionsCatalog.cs:172 in 1fd3ec2. [](commit_id = 1fd3ec2, deletion_comment = False) |
e5ddd64
to
15c2938
Compare
@@ -48,7 +55,7 @@ public sealed class ColumnSelectingEstimator : TrivialEstimator<ColumnSelectingT | |||
/// <param name="env">Instance of the host environment.</param> | |||
/// <param name="keepColumns">The array of column names to keep.</param> | |||
private ColumnSelectingEstimator(IHostEnvironment env, params string[] keepColumns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private [](start = 8, length = 7)
I don't see any use of this constructor except for being used at line 90. Since you are cleaning up the code as well, I would suggest removing it. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <param name="tensorFlowModel">The pre-loaded TensorFlow model.</param> | ||
/// <param name="inputColumnName"> The name of the model input.</param> | ||
/// <param name="outputColumnName">The name of the requested model output.</param> | ||
public static TensorFlowEstimator ScoreTensorFlowModel(this TransformsCatalog catalog, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the example that was linked below.
/// Applies a pre-trained Onnx model. | ||
/// All column names are provided, the input data column names/types must exactly match | ||
/// all model input names. All possible output columns are then generated, with names/types | ||
/// specified by the model. | ||
/// </summary> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can put this one in <remark>
section #Resolved
=> new OnnxScoringEstimator(CatalogUtils.GetEnvironment(catalog), transformer); | ||
/// <param name="modelFile">The path of the file containing the ONNX model.</param> | ||
/// <param name="outputColumnName">The input column.</param> | ||
/// <param name="inputColumnName">The output column resulting from the transformation.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change their description? you put input column for outputColumnName and vice versa. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// <param name="catalog">The transform's catalog.</param> | ||
/// <param name="modelFile">The path of the file containing the ONNX model.</param> | ||
/// <param name="outputColumnNames">The input columns.</param> | ||
/// <param name="inputColumnNames">The output columns resulting from the transformation.</param> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change their description? you put input columns for outputColumnNames and vice versa. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is part of the work outlined in #1798, and focuses on the GcnNorm, LpNorm, RandomFourier, CustomStopWords, VectorWhiten, PCA transformers/estimators:
This PR is marked as WIP because I have to figure out how to make the DNN assemblies BestFriends with the ONNX assembly. I need to figure out how to do that.