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
What happens when the target passed to fit and score disagree, and there are new unique values passed to score, or we passed str to fit and now int to score? We should raise an error explaining the problem. I think what would currently happen is a stack trace out of LabelEncoder, right?
Yup, we get a pretty clear error out of LabelEncoder but I'll catch it and rethrow with our own exception. Added test_new_unique_targets_in_score as a test for this.
Try calling binary and multiclass pipeline fit, predict, predict_proba and score with various types of target (int, float, bool, category, string), and test that either the encode/decode still functions properly, or we get a clear error message.
I already had what's now test_targets_data_types for string and categorical testing automl searches. I added bool and float/int checks. How does that look?
On second thought, I'm going to update the tests and address this in #645. I know you added a potential code snippet, but I think rather than introduce even more code to fix/patch something, might as well punt it after all!
@dsherry Thanks for the feedback! Added in the extra assert but RE regression, I opened up #946 to ensure that we have a clear error thrown to the user and then test that; I can tackle that issue in this epic as well but wanted this merged first :)
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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.