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

fix default workflow_data directory on Windows where /tmp does not exist #42067

Merged
merged 3 commits into from
Jan 11, 2024
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
7 changes: 5 additions & 2 deletions python/ray/workflow/api.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import functools
import logging
import tempfile
from typing import Dict, Set, List, Tuple, Union, Optional, Any
import time
import uuid
from pathlib import Path

import ray
from ray.dag import DAGNode
Expand Down Expand Up @@ -70,8 +72,9 @@ def init(
# We should use get_temp_dir_path, but for ray client, we don't
# have this one. We need a flag to tell whether it's a client
# or a driver to use the right dir.
# For now, just use /tmp/ray/workflow_data
ray.init(storage="file:///tmp/ray/workflow_data")
# For now, just use $TMP/ray/workflow_data
workflow_dir = Path(tempfile.gettempdir()) / "ray" / "workflow_data"
ray.init(storage=workflow_dir.as_uri())
workflow_access.init_management_actor(max_running_workflows, max_pending_workflows)
serialization.init_manager()

Expand Down
Loading