fix duplicate categorical features added from image exif metadata in RAI Vision Dashboard #2483
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
fix duplicate categorical features added from image exif metadata in RAI Vision Dashboard
Seeing duplicate categorical features in RAI VIsion Dashboard:
![image](https://private-user-images.githubusercontent.com/24683184/294312996-73568786-e5f6-4002-bada-a9f5eccb9776.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMjczNDEsIm5iZiI6MTczOTMyNzA0MSwicGF0aCI6Ii8yNDY4MzE4NC8yOTQzMTI5OTYtNzM1Njg3ODYtZTVmNi00MDAyLWJhZGEtYTlmNWVjY2I5Nzc2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDAyMjQwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUzMjhhZGYyMmJhNTkzZTI2ZDY2ZWYwMjE2YTc4Y2Y0ZDhkNTBhMDQ1MWEzZGJmNzQ4MTgyNTE2MGJlN2Y3MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.TyyQWzn7Zz-McFCTGoaY3yx5aRof_Yb5osiu07GS8KI)
It looks like we are adding them for every row but we should only add them once. Interestingly, this does not cause any errors currently as we are just checking if some feature name is in the list of categorical features in code, but it's definitely not desirable and can slow performance for larger image data.
This PR only adds the categorical feature names once to the list during exif feature metadata extraction and adds a test to validate this.
Checklist