Skip to content

Commit

Permalink
FEAT-#2236: Handling of space limited Ray Plasma directories (#2547)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Myskov <alexander.myskov@intel.com>
  • Loading branch information
amyskov authored Dec 17, 2020
1 parent 126f2a5 commit a58dcf6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions modin/engines/ray/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,20 @@ def initialize_ray(
_lru_evict=True,
)

global_node = ray.worker._global_node
# Check only for head node
if global_node.head:
import psutil
from modin.error_message import ErrorMessage

ray_session_dir = os.path.dirname(global_node._session_dir)
ray_free_space_GB = psutil.disk_usage(ray_session_dir).free // 10 ** 9
ErrorMessage.single_warning(
f"Modin Ray engine was started with {ray_free_space_GB} GB free space avaliable, "
"if it is not enough for your application, please set environment variable "
"MODIN_ON_RAY_PLASMA_DIR=/directory/without/space/limiting"
)

_move_stdlib_ahead_of_site_packages()
ray.worker.global_worker.run_function_on_all_workers(
_move_stdlib_ahead_of_site_packages
Expand Down

0 comments on commit a58dcf6

Please sign in to comment.