From e74c29777ebf7d0bf15f88c9b0f9c07176d43460 Mon Sep 17 00:00:00 2001 From: ShaochenYu-YW <72957335+ShaochenYu-YW@users.noreply.github.com> Date: Tue, 14 Jan 2025 22:07:01 -0800 Subject: [PATCH] [Ray Data] Add environment variable overrides for max_safe_block_size_factor We can increase this max_safe_block_size_factor to avoid block slicing in output_buffer.py Signed-off-by: ShaochenYu-YW <72957335+ShaochenYu-YW@users.noreply.github.com> --- python/ray/data/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/data/context.py b/python/ray/data/context.py index 823fd37e5957..339c18d2f750 100644 --- a/python/ray/data/context.py +++ b/python/ray/data/context.py @@ -34,7 +34,7 @@ # We will attempt to slice blocks whose size exceeds this factor * # target_max_block_size. We will warn the user if slicing fails and we produce # blocks larger than this threshold. -MAX_SAFE_BLOCK_SIZE_FACTOR = 1.5 +MAX_SAFE_BLOCK_SIZE_FACTOR = float(os.environ.get("RAY_DATA_MAX_SAFE_BLOCK_SIZE_FACTOR", "1.5")) DEFAULT_TARGET_MIN_BLOCK_SIZE = 1 * 1024 * 1024