#[non_exhaustive]pub struct RaySpec {
pub image_uri: String,
pub resource_pool_images: HashMap<String, String>,
pub head_node_resource_pool_id: String,
pub ray_metric_spec: Option<RayMetricSpec>,
pub ray_logs_spec: Option<RayLogsSpec>,
/* private fields */
}Expand description
Configuration information for the Ray cluster. For experimental launch, Ray cluster creation and Persistent cluster creation are 1:1 mapping: We will provision all the nodes within the Persistent cluster as Ray nodes.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.image_uri: StringOptional. Default image for user to choose a preferred ML framework (for example, TensorFlow or Pytorch) by choosing from Vertex prebuilt images. Either this or the resource_pool_images is required. Use this field if you need all the resource pools to have the same Ray image. Otherwise, use the {@code resource_pool_images} field.
resource_pool_images: HashMap<String, String>Optional. Required if image_uri isn’t set. A map of resource_pool_id to prebuild Ray image if user need to use different images for different head/worker pools. This map needs to cover all the resource pool ids. Example: { “ray_head_node_pool”: “head image” “ray_worker_node_pool1”: “worker image” “ray_worker_node_pool2”: “another worker image” }
head_node_resource_pool_id: StringOptional. This will be used to indicate which resource pool will serve as the Ray head node(the first node within that pool). Will use the machine from the first workerpool as the head node by default if this field isn’t set.
ray_metric_spec: Option<RayMetricSpec>Optional. Ray metrics configurations.
ray_logs_spec: Option<RayLogsSpec>Optional. OSS Ray logging configurations.
Implementations§
Source§impl RaySpec
impl RaySpec
pub fn new() -> Self
Sourcepub fn set_image_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_image_uri<T: Into<String>>(self, v: T) -> Self
Sets the value of image_uri.
Sourcepub fn set_resource_pool_images<T, K, V>(self, v: T) -> Self
pub fn set_resource_pool_images<T, K, V>(self, v: T) -> Self
Sets the value of resource_pool_images.
Sourcepub fn set_head_node_resource_pool_id<T: Into<String>>(self, v: T) -> Self
pub fn set_head_node_resource_pool_id<T: Into<String>>(self, v: T) -> Self
Sets the value of head_node_resource_pool_id.
Sourcepub fn set_ray_metric_spec<T: Into<Option<RayMetricSpec>>>(self, v: T) -> Self
pub fn set_ray_metric_spec<T: Into<Option<RayMetricSpec>>>(self, v: T) -> Self
Sets the value of ray_metric_spec.
Sourcepub fn set_ray_logs_spec<T: Into<Option<RayLogsSpec>>>(self, v: T) -> Self
pub fn set_ray_logs_spec<T: Into<Option<RayLogsSpec>>>(self, v: T) -> Self
Sets the value of ray_logs_spec.