From 1cfe2a80ef8e7b2c7a87fd8ac913e5ebbaa038d0 Mon Sep 17 00:00:00 2001 From: tongy-msft <91754176+tongyu-microsoft@users.noreply.github.com> Date: Thu, 13 Jul 2023 11:10:53 -0700 Subject: [PATCH] Update rai_text_insights.py --- .../responsibleai_text/rai_text_insights/rai_text_insights.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/responsibleai_text/responsibleai_text/rai_text_insights/rai_text_insights.py b/responsibleai_text/responsibleai_text/rai_text_insights/rai_text_insights.py index ff15b801cc..229b668ad3 100644 --- a/responsibleai_text/responsibleai_text/rai_text_insights/rai_text_insights.py +++ b/responsibleai_text/responsibleai_text/rai_text_insights/rai_text_insights.py @@ -637,8 +637,6 @@ def _save_predictions(self, path): is_classification_task) predict_output = self._wrapped_model.predict( test_without_target_column) - if isinstance(predict_output, pd.DataFrame): - predict_output = predict_output.to_numpy() self._write_to_file( prediction_output_path / (_PREDICT + _JSON_EXTENSION), json.dumps(predict_output.tolist())) @@ -646,8 +644,6 @@ def _save_predictions(self, path): if hasattr(self.model, SKLearn.PREDICT_PROBA): predict_proba_output = self.model.predict_proba( test_without_target_column) - if isinstance(predict_proba_output, pd.DataFrame): - predict_proba_output = predict_proba_output.to_numpy() self._write_to_file( prediction_output_path / (_PREDICT_PROBA + _JSON_EXTENSION), json.dumps(predict_proba_output.tolist()))