From 95969b0ed5a4643523caf7e4e6257b5f4bcd4908 Mon Sep 17 00:00:00 2001 From: Cheng Su Date: Fri, 17 Nov 2023 10:25:37 -0800 Subject: [PATCH 1/3] Fix doc for read_json Signed-off-by: Cheng Su --- python/ray/data/read_api.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/ray/data/read_api.py b/python/ray/data/read_api.py index 1f9a6d48fbd04..5ab2f631022c5 100644 --- a/python/ray/data/read_api.py +++ b/python/ray/data/read_api.py @@ -1044,7 +1044,11 @@ def read_json( ... "s3://anonymous@ray-example-data/log.json", ... read_options=pajson.ReadOptions(block_size=block_size) ... ) - Dataset(num_blocks=8, num_rows=1, schema={timestamp: timestamp[s], size: int64}) + Dataset( + num_blocks=..., + num_rows=1, + schema={timestamp: timestamp[s], size: int64} + ) Args: paths: A single file or directory, or a list of file or directory paths. From 97ab4e60d8a78eb7fb338c9a82490dbe173555f3 Mon Sep 17 00:00:00 2001 From: Cheng Su Date: Mon, 20 Nov 2023 15:37:36 -0800 Subject: [PATCH 2/3] Skip doc test for read_json Signed-off-by: Cheng Su --- python/ray/data/read_api.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/python/ray/data/read_api.py b/python/ray/data/read_api.py index 5ab2f631022c5..f00399129d282 100644 --- a/python/ray/data/read_api.py +++ b/python/ray/data/read_api.py @@ -1040,15 +1040,10 @@ def read_json( >>> import pyarrow.json as pajson >>> block_size = 10 << 20 # Set block size to 10MB - >>> ray.data.read_json( + >>> ray.data.read_json( # doctest: +SKIP ... "s3://anonymous@ray-example-data/log.json", ... read_options=pajson.ReadOptions(block_size=block_size) ... ) - Dataset( - num_blocks=..., - num_rows=1, - schema={timestamp: timestamp[s], size: int64} - ) Args: paths: A single file or directory, or a list of file or directory paths. From c6240ed636408b19a7ed46d25b3c633b5375a20b Mon Sep 17 00:00:00 2001 From: Cheng Su Date: Tue, 21 Nov 2023 13:25:17 -0800 Subject: [PATCH 3/3] Update python/ray/data/read_api.py Co-authored-by: Balaji Veeramani Signed-off-by: Cheng Su --- python/ray/data/read_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/data/read_api.py b/python/ray/data/read_api.py index f00399129d282..192b0a2d318cd 100644 --- a/python/ray/data/read_api.py +++ b/python/ray/data/read_api.py @@ -1040,7 +1040,7 @@ def read_json( >>> import pyarrow.json as pajson >>> block_size = 10 << 20 # Set block size to 10MB - >>> ray.data.read_json( # doctest: +SKIP + >>> ray.data.read_json( # doctest: +SKIP ... "s3://anonymous@ray-example-data/log.json", ... read_options=pajson.ReadOptions(block_size=block_size) ... )