Skip to content

Commit

Permalink
Update rai_text_insights.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tongyu-microsoft authored Jul 13, 2023
1 parent c441282 commit 1cfe2a8
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -637,17 +637,13 @@ 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()))

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()))
Expand Down

0 comments on commit 1cfe2a8

Please sign in to comment.