Skip to content

Commit affdf73

Browse files
authored
chore: ray 2.45 (#3143)
1 parent 36c7671 commit affdf73

File tree

3 files changed

+138
-208
lines changed

3 files changed

+138
-208
lines changed

awswrangler/distributed/ray/datasources/file_datasink.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from ray.data._internal.delegating_block_builder import DelegatingBlockBuilder
1111
from ray.data._internal.execution.interfaces import TaskContext
1212
from ray.data.block import Block, BlockAccessor
13-
from ray.data.datasource.datasink import Datasink
13+
from ray.data.datasource.datasink import Datasink, WriteResult
1414
from ray.data.datasource.filename_provider import FilenameProvider
1515
from ray.types import ObjectRef
1616

@@ -21,7 +21,7 @@
2121
_logger: logging.Logger = logging.getLogger(__name__)
2222

2323

24-
class _BlockFileDatasink(Datasink):
24+
class _BlockFileDatasink(Datasink[str]):
2525
def __init__(
2626
self,
2727
path: str,
@@ -91,12 +91,12 @@ def write_block(self, file: Any, block: BlockAccessor) -> None:
9191
# and is meant to be used for singular actions like
9292
# [committing a transaction](https://docs.ray.io/en/latest/data/api/doc/ray.data.Datasource.html).
9393
# As deceptive as it may look, there is no race condition here.
94-
def on_write_complete(self, write_results: list[Any], **_: Any) -> None:
94+
def on_write_complete(self, write_results: WriteResult[str]) -> None:
9595
"""Execute callback after all write tasks complete."""
9696
_logger.debug("Write complete %s.", write_results)
9797

9898
# Collect and return all write task paths
99-
self._write_paths.extend(write_results)
99+
self._write_paths.extend(write_results.write_returns)
100100

101101
def get_write_paths(self) -> list[str]:
102102
"""Return S3 paths of where the results have been written."""

0 commit comments

Comments
 (0)