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

Update text insights and error_analysis_manager to handle pd.DataFrame predictions and prediction with type of string #2179

Merged
merged 3 commits into from
Jul 13, 2023

Conversation

tongyu-microsoft
Copy link
Contributor

This PR updates rai_text_insights and error_analysis_manager.

For rai_text_insights, for predict_output and predict_proba_output, since we only support numpy array, this PR adds a check to handle pandas.DataFrame, and convert pd.DataFrame to numpy array.

For error_analysis_manager, in the case where the prediction value is a string, we should output the predictions directly, no need to map it from self.classes.

Description

Here is an example AML pipeline running based on responsibleai-text package with the changes in this PR: https://ml.azure.com/experiments/id/26da27c2-760c-4ae7-af6f-fb35b708e952/runs/teal_owl_t5k6t3v2gv?wsid=/subscriptions/3d6da6ed-6af5-4a74-87c6-da367514f8e0/resourceGroups/ResponsibleAIE2E/providers/Microsoft.MachineLearningServices/workspaces/ResponsibleAIE2ETest&flight=RAIAutomlIntegration&tid=72f988bf-86f1-41af-91ab-2d7cd011db47#
Link to dashboard: https://ml.azure.com/model/analysis/distilbert-base-uncased/be98b4b8-550a-40fc-8410-fc57258184c2?wsid=/subscriptions/3d6da6ed-6af5-4a74-87c6-da367514f8e0/resourceGroups/ResponsibleAIE2E/providers/Microsoft.MachineLearningServices/workspaces/ResponsibleAIE2ETest&flight=RAIAutomlIntegration&tid=72f988bf-86f1-41af-91ab-2d7cd011db47

Checklist

  • I have added screenshots above for all UI changes.
  • I have added e2e tests for all UI changes.
  • Documentation was updated if it was needed.

@tongyu-microsoft tongyu-microsoft changed the title Update text insights and error_analysis_manager to handle pd.DataFrame predictions Update text insights and error_analysis_manager to handle pd.DataFrame predictions and prediction with string type Jul 12, 2023
@tongyu-microsoft tongyu-microsoft changed the title Update text insights and error_analysis_manager to handle pd.DataFrame predictions and prediction with string type Update text insights and error_analysis_manager to handle pd.DataFrame predictions and prediction with type of string Jul 12, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2023

Codecov Report

Merging #2179 (1cfe2a8) into main (9bfd780) will decrease coverage by 9.80%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2179      +/-   ##
==========================================
- Coverage   88.14%   78.34%   -9.80%     
==========================================
  Files         129       26     -103     
  Lines        7296     2152    -5144     
==========================================
- Hits         6431     1686    -4745     
+ Misses        865      466     -399     
Flag Coverage Δ
unittests 78.34% <100.00%> (-9.80%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ponsibleai_text/managers/error_analysis_manager.py 88.80% <100.00%> (-0.75%) ⬇️

... and 103 files with indirect coverage changes

@tongyu-microsoft tongyu-microsoft enabled auto-merge (squash) July 13, 2023 18:11
@tongyu-microsoft tongyu-microsoft merged commit f3d8cbb into main Jul 13, 2023
@tongyu-microsoft tongyu-microsoft deleted the tongy/updateTextInsights branch July 13, 2023 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants