diff --git a/python/ray/serve/batching.py b/python/ray/serve/batching.py index 5b6168bcbd2d..43a354b56769 100644 --- a/python/ray/serve/batching.py +++ b/python/ray/serve/batching.py @@ -228,14 +228,13 @@ def batch(_func=None, max_batch_size=10, batch_wait_timeout_s=0.0): or `batch_wait_timeout_s` has elapsed, whichever occurs first. Example: - >>> from ray import serve - >>> @serve.batch(max_batch_size=50, batch_wait_timeout_s=0.5) # doctest: +SKIP - ... async def handle_batch(batch: List[str]): # doctest: +SKIP - ... return [s.lower() for s in batch] # doctest: +SKIP - - >>> async def handle_single(s: str): # doctest: +SKIP - ... # Returns s.lower(). - ... return await handle_batch(s) # doctest: +SKIP + >>> from ray import serve + >>> @serve.batch(max_batch_size=50, batch_wait_timeout_s=0.5) # doctest: +SKIP + ... async def handle_batch(batch: List[str]): # doctest: +SKIP + ... return [s.lower() for s in batch] # doctest: +SKIP + >>> async def handle_single(s: str): # doctest: +SKIP + ... # Returns s.lower(). + ... return await handle_batch(s) # doctest: +SKIP Arguments: max_batch_size: the maximum batch size that will be executed in