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

[Datasets] Fix to_tf when the input feature_columns is a list. #31228

Merged
merged 19 commits into from
Dec 21, 2022
Merged
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3204,7 +3204,9 @@ def convert_batch_to_tensors(
if isinstance(columns, str):
return convert_ndarray_to_tf_tensor(batch[columns], type_spec=type_spec)
return {
convert_ndarray_to_tf_tensor(batch[column], type_spec=type_spec[column])
column: convert_ndarray_to_tf_tensor(
batch[column], type_spec=type_spec[column]
)
for column in columns
}

Expand Down