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] Clarify deprecated Datasource docstrings #44790

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all 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
15 changes: 7 additions & 8 deletions python/ray/data/datasource/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,18 @@ class Datasource:

@Deprecated
def create_reader(self, **read_args) -> "Reader":
"""Return a Reader for the given read arguments.

The reader object will be responsible for querying the read metadata, and
generating the actual read tasks to retrieve the data blocks upon request.

Args:
read_args: Additional kwargs to pass to the datasource impl.
"""
Deprecated: Implement :meth:`Datasource.get_read_tasks` and
:meth:`Datasource.estimate_inmemory_data_size` instead.
"""
return _LegacyDatasourceReader(self, **read_args)

@Deprecated
def prepare_read(self, parallelism: int, **read_args) -> List["ReadTask"]:
"""Deprecated: Please implement create_reader() instead."""
"""
Deprecated: Implement :meth:`Datasource.get_read_tasks` and
:meth:`Datasource.estimate_inmemory_data_size` instead.
"""
raise NotImplementedError

def get_name(self) -> str:
Expand Down
Loading