Skip to content

Commit

Permalink
Fix tensorarray to numpy conversion (ray-project#34115)
Browse files Browse the repository at this point in the history
* Revert "[Datasets] Revert "Enable streaming executor by default (ray-project#32493)" (ray-project#33485)"

This reverts commit 5c79954.

* Fix tensorarray to numpy conversion
  • Loading branch information
jianoaix committed Apr 6, 2023
1 parent af1da0c commit 0838993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ray/serve/air_integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _unpack_dataframe_to_serializable(output_df: "pd.DataFrame") -> "pd.DataFram
for col in output_df.columns:
# TensorArray requires special handling to numpy array.
if isinstance(output_df.dtypes[col], TensorDtype):
output_df.loc[:, col] = list(output_df[col].to_numpy())
output_df[col] = list(output_df[col].to_numpy())
# # DL predictor outputs raw ndarray outputs as opaque numpy object.
# # ex: output_df = pd.DataFrame({"predictions": [np.array(1)]})
elif output_df.dtypes[col] == np.dtype(object) and all(
Expand Down

0 comments on commit 0838993

Please sign in to comment.