You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dagster_ray/kuberay/client/raycluster/client.py
+29-8Lines changed: 29 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -73,8 +73,10 @@ class RayClusterEndpoints(TypedDict): # these are ports
73
73
74
74
75
75
classRayClusterHead(TypedDict):
76
-
podIP: str
77
-
serviceIP: str
76
+
podIP: NotRequired[str]
77
+
podName: NotRequired[str]
78
+
serviceIP: NotRequired[str]
79
+
serviceName: NotRequired[str]
78
80
79
81
80
82
classRayClusterStatus(TypedDict):
@@ -112,12 +114,23 @@ def wait_until_ready(
112
114
name: str,
113
115
namespace: str,
114
116
timeout: float,
115
-
image: str|None=None,
117
+
failure_tolerance_timeout: float=0.0,
116
118
poll_interval: float=5.0,
117
119
log_cluster_conditions: bool=False,
118
120
) ->tuple[str, RayClusterEndpoints]:
119
121
"""
120
122
If ready, returns service ip address and a dictionary of ports.
123
+
124
+
Parameters:
125
+
name (str): The name of the `RayCluster` resource
126
+
namespace (str): The namespace of the `RayCluster` resource
127
+
timeout (float): The timeout in seconds to wait for the cluster to become ready.
128
+
failure_tolerance_timeout (float): The period in seconds to wait for the cluster to transition out of `failed` state if it reaches it. This state can be transient under certain conditions. With the default value of 0, the first `failed` state appearance will raise an exception immediately.
129
+
poll_interval (float): The interval in seconds to poll the cluster status.
130
+
log_cluster_conditions (bool): Whether to log cluster conditions. See [KubeRay docs](https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/observability.html#raycluster-status-conditions)
131
+
132
+
Returns:
133
+
tuple[str, RayClusterEndpoints]: The service ip address and a dictionary of ports.
Copy file name to clipboardExpand all lines: src/dagster_ray/kuberay/client/rayjob/client.py
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,12 +71,24 @@ def wait_until_ready(
71
71
name: str,
72
72
namespace: str,
73
73
timeout: float=600,
74
+
failure_tolerance_timeout: float=0.0,
74
75
poll_interval: float=1.0,
75
76
log_cluster_conditions: bool=False,
76
77
) ->tuple[str, RayClusterEndpoints]:
77
78
"""Wait until the RayCluster attached to the RayJob is ready.
78
79
79
80
This doesn't necessarily mean that the cluster has already taken a job, just that it is ready to accept connections.
81
+
82
+
Parameters:
83
+
name (str): The name of the `RayJob` resource
84
+
namespace (str): The namespace of the `RayJob` resource
85
+
timeout (float): The timeout in seconds to wait for the cluster to become ready.
86
+
failure_tolerance_timeout (float): The period in seconds to wait for the cluster to transition out of `failed` state if it reaches it. This state can be transient under certain conditions. With the default value of 0, the first `failed` state appearance will raise an exception immediately.
87
+
poll_interval (float): The interval in seconds to poll the cluster status.
88
+
log_cluster_conditions (bool): Whether to log cluster conditions. See [KubeRay docs](https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/observability.html#raycluster-status-conditions)
89
+
90
+
Returns:
91
+
tuple[str, RayClusterEndpoints]: The service ip address and a dictionary of ports.
Copy file name to clipboardExpand all lines: src/dagster_ray/kuberay/resources/base.py
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,10 @@ class BaseKubeRayResourceConfig(dg.Config):
21
21
default=DEFAULT_DEPLOYMENT_NAME,
22
22
description="Dagster deployment name. Is used as a prefix for the Kubernetes resource name. Dagster Cloud variables are used to determine the default value.",
23
23
)
24
+
failure_tolerance_timeout: float=Field(
25
+
default=0.0,
26
+
description="The period in seconds to wait for the cluster to transition out of `failed` state if it reaches it. This state can be transient under certain conditions. With the default value of 0, the first `failed` state appearance will raise an exception immediately.",
27
+
)
24
28
poll_interval: float=Field(default=1.0, description="Poll interval for various API requests")
0 commit comments