-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Do not pass validation set and metrics callback to Image Classification API. #4430
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -240,9 +240,6 @@ public ITrainerEstimator CreateInstance(MLContext mlContext, IEnumerable<Sweepab | |
| ColumnInformation columnInfo, IDataView validationSet) | ||
| { | ||
| var options = TrainerExtensionUtil.CreateOptions<Options>(null, columnInfo.LabelColumnName); | ||
| options.ValidationSet = validationSet; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please file a tracking issue for cleaning up the other code, and enabling early stopping. We should discuss how to get early stopping alive. It will be useful. Remaining issues:
This current PR is a small work around for (1) and (2) by simply not passing the dataset. We should more fully address them in a follow-up.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For 1 and 2, it is up to the caller to pass the right dataset, there is no issue in the ImageClassification API by itself. Right now Image Classification in AutoML is enabled with default parameters and sweeping is DISABLED, the reason being, even without sweeping it can give you good results, we have actually ran more than 50 benchmark to make this claim. I will be happy to discuss in person why I disagree with most of your comment but will open an issue for clean up.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This is specifically addressing the DNNImageClassifier use in AutoML. |
||
| var logger = ((IChannelProvider)mlContext).Start(nameof(ImageClassificationExtension)); | ||
| options.MetricsCallback = (ImageClassificationMetrics metric) => { logger.Trace(metric.ToString()); } ; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the future, we should work out how to get status updates all the way to Model Builder and the CLI.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are already getting the status updates. Image Classification API by default plumbs status updates to MLCONTEXT.LOG. The caller needs to read from there., |
||
| return mlContext.MulticlassClassification.Trainers.ImageClassification(options); | ||
| } | ||
|
|
||
|
|
||
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.
Are you also passing the validation dataset during CodeGen? If so, it should be removed there too.
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.
No, I'm not passing validations set at codegen.