fix failing vision tests due to new RAI validation logic which doesn't allow non string dropped column names #2302
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.
Description
After responsibleai v0.30.0 package release, one of the vision tests started failing due to new validation logic introduced in the v0.30.0 package:
The new validation logic does not allow dropped features to be non-strings (in this case integers). However, pandas does allow integer column names and in this case the dataset in the test had integer column names. To fix the test, I modified the pandas dataframe integer columns to be text type instead of int type, so that the new validation logic would pass. An alternative fix might be to allow dropped features to have integer values instead of strings.
In addition I changed iloc to use two dimensional indexing always since I noticed the behavior could be different than expected when using metadata features with iloc indexing followed by row index if index is not reset as a safeguard - which I noticed while debugging.
Checklist