From ae1de159a797b65336528ece2cd37c7f31f1644b Mon Sep 17 00:00:00 2001 From: Balaji Veeramani Date: Mon, 4 Nov 2024 17:03:55 -0800 Subject: [PATCH] [Data] Fix missing lines in `BundleQueue` docstring (#48553) Follow-up to #48503. --------- Signed-off-by: Balaji Veeramani --- .../ray/data/_internal/execution/bundle_queue/bundle_queue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/ray/data/_internal/execution/bundle_queue/bundle_queue.py b/python/ray/data/_internal/execution/bundle_queue/bundle_queue.py index 59fa5c16f737..f11bacf14c33 100644 --- a/python/ray/data/_internal/execution/bundle_queue/bundle_queue.py +++ b/python/ray/data/_internal/execution/bundle_queue/bundle_queue.py @@ -24,6 +24,7 @@ def add(self, bundle: "RefBundle") -> None: @abc.abstractmethod def pop(self) -> "RefBundle": """Remove and return the head of the queue. + Raises: IndexError: If the queue is empty. """ @@ -32,6 +33,7 @@ def pop(self) -> "RefBundle": @abc.abstractmethod def peek(self) -> Optional["RefBundle"]: """Return the head of the queue without removing it. + If the queue is empty, return `None`. """ ... @@ -54,6 +56,7 @@ def estimate_size_bytes(self) -> int: @abc.abstractmethod def is_empty(self): """Return whether this queue and all of its internal data structures are empty. + This method is used for testing. """ ...