2525from ray .data ._internal .execution .operators .input_data_buffer import InputDataBuffer
2626from ray .data ._internal .execution .operators .zip_operator import ZipOperator
2727from ray .data ._internal .execution .util import memory_string
28- from ray .data ._internal .util import GiB
2928from ray .data .context import DataContext
3029from ray .util .debug import log_once
3130
@@ -120,8 +119,6 @@ def __init__(
120119 )
121120 )
122121
123- self ._warn_about_object_store_memory_if_needed ()
124-
125122 def _terminal_operator_from_topology (
126123 self , topology : "Topology"
127124 ) -> PhysicalOperator :
@@ -146,35 +143,6 @@ def _terminal_operator_from_topology(
146143 f"{ len (sinks )} : { sinks !r} "
147144 )
148145
149- def _warn_about_object_store_memory_if_needed (self ):
150- """Warn if object store memory is configured below 50% of total memory."""
151- import ray
152- from ray .data .context import WARN_PREFIX
153- from ray .util .debug import log_once
154-
155- if not ray .is_initialized ():
156- return
157-
158- cluster_resources = ray .cluster_resources ()
159- total_memory = cluster_resources .get ("memory" , 0 )
160- object_store_memory = cluster_resources .get ("object_store_memory" , 0 )
161-
162- # Check if we have actual numeric values (not mocks or None)
163- if total_memory > 0 :
164- object_store_fraction = object_store_memory / total_memory
165-
166- if object_store_fraction < 0.5 and log_once (
167- "ray_data_object_store_memory_warning"
168- ):
169- logger .warning (
170- f"{ WARN_PREFIX } Ray's object store is configured to use only "
171- f"{ object_store_fraction :.1%} of available memory ({ object_store_memory / GiB :.1f} GiB "
172- f"out of { total_memory / GiB :.1f} GiB total). For optimal Ray Data performance, "
173- f"we recommend setting the object store to at least 50% of available memory. "
174- f"You can do this by setting the 'object_store_memory' parameter when calling "
175- f"ray.init() or by setting the RAY_DEFAULT_OBJECT_STORE_MEMORY_PROPORTION environment variable."
176- )
177-
178146 def set_external_consumer_bytes (self , num_bytes : int ) -> None :
179147 """Set the bytes buffered by external consumers."""
180148 assert (
0 commit comments