-
Notifications
You must be signed in to change notification settings - Fork 516
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
fix: KeyError no longer occurs when using groupfolds for regression tasks. #1385
fix: KeyError no longer occurs when using groupfolds for regression tasks. #1385
Conversation
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.
Thank you @dannycg1996 for the PR. Please see my comments in #1384 .
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.
Since we're allowing group
for regression task. Do you mind update the related docstring as well? Thanks.
Thanks @thinkall - I have updated the docs. Please let me know if I've missed anything! |
I can make a release once your PR is merged. |
That's great - thanks! |
Why are these changes needed?
Currently KeyErrors are raised (under certain conditions outlined in the linked issue) when using AutoML for regression tasks, with GroupKFold splits.
This was caused by the index not being reset for group folds.
As part of this PR, I've modified the if statement in
prepare_data
to ensure that we now also reset the index, regardless of the split type. This will ensure that this error doesn't occur when group folds are used, or when custom splitters are passed in. I've also added a test, which checks that my example code from the linked issue can now run without errors.Hopefully that's merge-able - please let me know if you have any suggestions/comments.
Thanks!
Related issue number
Close #1384
Closes #1254
Checks