Skip to content
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 crash when 0 rows of class #2990

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

Innixma
Copy link
Contributor

@Innixma Innixma commented Mar 2, 2023

Issue #, if available:

Description of changes:

  • When the label column is dtype categorical, and a category exists that is present in 0 rows of the training data, an exception would be raised 'NoneType' object has no attribute 'reset_index'. This PR fixes this issue by returning early in the function call.
  • Note that this bug would only appear in very specific situations, and only if the user somehow had their dtype be category for the label column.
  • Additionally fixes FutureWarnings from usage of deprecated functions .append and .iteritems

This bug was found while expanding the tabular benchmark suite to 300 datasets (from 100), as it caused 2 datasets to crash.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Innixma Innixma added this to the 0.7.1 Release milestone Mar 2, 2023
@Innixma Innixma added bug Something isn't working module: tabular labels Mar 2, 2023
@github-actions
Copy link

github-actions bot commented Mar 2, 2023

Job PR-2990-c44c1c7 is done.
Docs are uploaded to http://autogluon-staging.s3-website-us-west-2.amazonaws.com/PR-2990/c44c1c7/index.html

@Innixma Innixma merged commit a3fba70 into autogluon:master Mar 2, 2023
@Innixma Innixma modified the milestones: 0.7.1 Release, 0.8 Release May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module: tabular
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants