Skip to content

Commit a58dcf6

Browse files
authored
FEAT-#2236: Handling of space limited Ray Plasma directories (#2547)
Signed-off-by: Alexander Myskov <[email protected]>
1 parent 126f2a5 commit a58dcf6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

modin/engines/ray/utils.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,20 @@ def initialize_ray(
149149
_lru_evict=True,
150150
)
151151

152+
global_node = ray.worker._global_node
153+
# Check only for head node
154+
if global_node.head:
155+
import psutil
156+
from modin.error_message import ErrorMessage
157+
158+
ray_session_dir = os.path.dirname(global_node._session_dir)
159+
ray_free_space_GB = psutil.disk_usage(ray_session_dir).free // 10 ** 9
160+
ErrorMessage.single_warning(
161+
f"Modin Ray engine was started with {ray_free_space_GB} GB free space avaliable, "
162+
"if it is not enough for your application, please set environment variable "
163+
"MODIN_ON_RAY_PLASMA_DIR=/directory/without/space/limiting"
164+
)
165+
152166
_move_stdlib_ahead_of_site_packages()
153167
ray.worker.global_worker.run_function_on_all_workers(
154168
_move_stdlib_ahead_of_site_packages

0 commit comments

Comments
 (0)