1.16.20

flytekitplugins.ray.models

Directory

Classes

Class Description
HeadGroupSpec
RayCluster Define RayCluster spec that will be used by KubeRay to launch the cluster.
RayJob Models _ray_pb2.
WorkerGroupSpec

flytekitplugins.ray.models.HeadGroupSpec

Parameters

class HeadGroupSpec(
    ray_start_params: typing.Optional[typing.Dict[str, str]],
    k8s_pod: typing.Optional[flytekit.models.task.K8sPod],
)
Parameter Type Description
ray_start_params typing.Optional[typing.Dict[str, str]]
k8s_pod typing.Optional[flytekit.models.task.K8sPod]

Properties

Property Type Description
is_empty None
k8s_pod None Additional pod specs for the head node pod.
ray_start_params None The ray start params of head node group.

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string()
to_flyte_idl()

from_flyte_idl()

def from_flyte_idl(
    proto,
)
Parameter Type Description
proto

Returns: HeadGroupSpec

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

Returns: Text

to_flyte_idl()

def to_flyte_idl()

Returns: flyteidl.plugins._ray_pb2.HeadGroupSpec

flytekitplugins.ray.models.RayCluster

Define RayCluster spec that will be used by KubeRay to launch the cluster.

Parameters

class RayCluster(
    worker_group_spec: typing.List[flytekitplugins.ray.models.WorkerGroupSpec],
    head_group_spec: typing.Optional[flytekitplugins.ray.models.HeadGroupSpec],
    enable_autoscaling: bool,
)
Parameter Type Description
worker_group_spec typing.List[flytekitplugins.ray.models.WorkerGroupSpec]
head_group_spec typing.Optional[flytekitplugins.ray.models.HeadGroupSpec]
enable_autoscaling bool

Properties

Property Type Description
enable_autoscaling bool Whether to enable autoscaling.
head_group_spec flytekitplugins.ray.models.HeadGroupSpec The head group configuration.
is_empty None
worker_group_spec typing.List[flytekitplugins.ray.models.WorkerGroupSpec] The worker group configurations.

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string()
to_flyte_idl()

from_flyte_idl()

def from_flyte_idl(
    proto,
)
Parameter Type Description
proto

Returns: RayCluster

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

Returns: Text

to_flyte_idl()

def to_flyte_idl()

Returns: flyteidl.plugins._ray_pb2.RayCluster

flytekitplugins.ray.models.RayJob

Models _ray_pb2.RayJob

Parameters

class RayJob(
    ray_cluster: flytekitplugins.ray.models.RayCluster,
    runtime_env: typing.Optional[str],
    runtime_env_yaml: typing.Optional[str],
    ttl_seconds_after_finished: typing.Optional[int],
    shutdown_after_job_finishes: bool,
)
Parameter Type Description
ray_cluster flytekitplugins.ray.models.RayCluster
runtime_env typing.Optional[str]
runtime_env_yaml typing.Optional[str]
ttl_seconds_after_finished typing.Optional[int]
shutdown_after_job_finishes bool

Properties

Property Type Description
is_empty None
ray_cluster flytekitplugins.ray.models.RayCluster
runtime_env typing.Optional[str]
runtime_env_yaml typing.Optional[str]
shutdown_after_job_finishes bool
ttl_seconds_after_finished typing.Optional[int]

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string()
to_flyte_idl()

from_flyte_idl()

def from_flyte_idl(
    proto: flyteidl.plugins.ray_pb2.RayJob,
)
Parameter Type Description
proto flyteidl.plugins.ray_pb2.RayJob

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

Returns: Text

to_flyte_idl()

def to_flyte_idl()

flytekitplugins.ray.models.WorkerGroupSpec

Parameters

class WorkerGroupSpec(
    group_name: str,
    replicas: int,
    min_replicas: typing.Optional[int],
    max_replicas: typing.Optional[int],
    ray_start_params: typing.Optional[typing.Dict[str, str]],
    k8s_pod: typing.Optional[flytekit.models.task.K8sPod],
)
Parameter Type Description
group_name str
replicas int
min_replicas typing.Optional[int]
max_replicas typing.Optional[int]
ray_start_params typing.Optional[typing.Dict[str, str]]
k8s_pod typing.Optional[flytekit.models.task.K8sPod]

Properties

Property Type Description
group_name None Group name of the current worker group.
is_empty None
k8s_pod None Additional pod specs for the worker node pods.
max_replicas None Max replicas of the worker group.
min_replicas None Min replicas of the worker group.
ray_start_params None The ray start params of worker node group.
replicas None Desired replicas of the worker group.

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string()
to_flyte_idl()

from_flyte_idl()

def from_flyte_idl(
    proto,
)
Parameter Type Description
proto

Returns: WorkerGroupSpec

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

Returns: Text

to_flyte_idl()

def to_flyte_idl()

Returns: flyteidl.plugins._ray_pb2.WorkerGroupSpec