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

[Data] Skip schema call in to_tf if tf.TypeSpec is provided #42917

Merged
merged 5 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix type
Signed-off-by: Cheng Su <[email protected]>
  • Loading branch information
c21 committed Feb 7, 2024
commit 1dcf4d8750f2abea440a552b5b6b733a2698698f
4 changes: 2 additions & 2 deletions python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -4004,8 +4004,8 @@ def to_tf(
drop_last: bool = False,
local_shuffle_buffer_size: Optional[int] = None,
local_shuffle_seed: Optional[int] = None,
feature_type_spec: Union[tf.TypeSpec, Dict[str, tf.TypeSpec]] = None,
label_type_spec: Union[tf.TypeSpec, Dict[str, tf.TypeSpec]] = None,
feature_type_spec: Union["tf.TypeSpec", Dict[str, "tf.TypeSpec"]] = None,
label_type_spec: Union["tf.TypeSpec", Dict[str, "tf.TypeSpec"]] = None,
# Deprecated
prefetch_blocks: int = 0,
) -> "tf.data.Dataset":
Expand Down
4 changes: 2 additions & 2 deletions python/ray/data/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,8 +676,8 @@ def to_tf(
drop_last: bool = False,
local_shuffle_buffer_size: Optional[int] = None,
local_shuffle_seed: Optional[int] = None,
feature_type_spec: Union[tf.TypeSpec, Dict[str, tf.TypeSpec]] = None,
label_type_spec: Union[tf.TypeSpec, Dict[str, tf.TypeSpec]] = None,
feature_type_spec: Union["tf.TypeSpec", Dict[str, "tf.TypeSpec"]] = None,
label_type_spec: Union["tf.TypeSpec", Dict[str, "tf.TypeSpec"]] = None,
# Deprecated.
prefetch_blocks: int = 0,
) -> "tf.data.Dataset":
Expand Down