-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
handle exception during GetNextPipeline for AutoML #5455
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
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.
From #5428 (comment):
Iteration ~70 is interesting as it's when the SMAC sweeper moves from random sweeping (where it explores the hyperparameter space) to a bayesian style, and starts to generate new hyperparameter sets and rank them. Hence why it dies in
sweeper.ProposeSweeps()
at ~70.Sweeping pattern is:
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.
Thanks for explaining the behavior of AutoML experiment here.
I debugged the issue and looks like for this case at some stage (around 70 iterations) the Score of all valid history becomes NaN and NaN are not accepted as valid number for Trainer (FastTree in this case) thus we got "All instances skipped due to missing features" error.
Here I filtered the history with additional condition: score must be finite.
In reply to: 511429267 [](ancestors = 511429267)
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.
Interesting. I would have expected that FastTree would simply skip rows with NaN labels.
FastTree may be failing due to NaNs in the feature vector (aka, the hyperparameter set for the pipeline).
As a test, would it be possible to fill in a value (perhaps
0.5
) for the score field? This would test if (1) SMAC is dying due to the score column being NaN; or (2) our filtering ofFloatUtils.IsFinite(r.Score))
, causes indirect removing rows which would cause SMAC to fail due to missing values within the feature vector.If filling with
0.5
causes SMAC to work, then your filtering by inspecting the score is a good method. If it still fails, we should instead and filter the history by looking for NaN values in the feature vectors (or perhaps consider throwing as they are unexpected).NaN values for metrics are expected/semi-common, but I wouldn't expect a NaN in the feature vector.
After filtering, are there any rows left from the history? Does it continue sweeping, or does it exit at ~70?
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 would have expected that FastTree would simply skip rows with NaN labels.
FastTree may be failing due to NaNs in the feature vector (aka, the hyperparameter set for the pipeline).
As a test, would it be possible to fill in a value (perhaps 0.5) for the score field? This would test if (1) SMAC is dying due to the score column being NaN; or (2) our filtering of FloatUtils.IsFinite(r.Score)), causes indirect removing rows which would cause SMAC to fail due to missing values within the feature vector.
NaN values for metrics are expected/semi-common, but I wouldn't expect a NaN in the feature vector.
After filtering, are there any rows left from the history? Does it continue sweeping, or does it exit at ~70?
In reply to: 513323635 [](ancestors = 513323635)
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.
@frank-dong-ms: Thanks for investigating. This all sounds good and the NaN filtering on the score does seem like the right route.
I'd recommend pushing in #5163 before this PR.
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.
@justinormont Sure, thanks Justin for your review and great suggestions.
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.
#5163 has been merged, could you approve this PR so I can merge this one. @justinormont
In reply to: 513926616 [](ancestors = 513926616)