Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT-#2236: Handling of space limited Ray Plasma directories #2547

Merged
merged 3 commits into from
Dec 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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