0.0.0+develop

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

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

Methods

Method Description
from_flyte_idl() .
serialize_to_string()
short_string() :rtype: Text.
to_flyte_idl() :rtype: flyteidl.
verbose_string() :rtype: Text.

from_flyte_idl()

def from_flyte_idl(
    proto,
) -> e: HeadGroupSpec
Parameter Type
proto

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

:rtype: Text

to_flyte_idl()

def to_flyte_idl()

:rtype: flyteidl.plugins._ray_pb2.HeadGroupSpec

verbose_string()

def verbose_string()

:rtype: Text

Properties

Property Type Description
is_empty
k8s_pod
Additional pod specs for the head node pod.
:rtype: K8sPod
ray_start_params
The ray start params of head node group.
:rtype: typing.Dict[str, str]

flytekitplugins.ray.models.RayCluster

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

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
worker_group_spec typing.List[flytekitplugins.ray.models.WorkerGroupSpec]
head_group_spec typing.Optional[flytekitplugins.ray.models.HeadGroupSpec]
enable_autoscaling bool

Methods

Method Description
from_flyte_idl() .
serialize_to_string()
short_string() :rtype: Text.
to_flyte_idl() :rtype: flyteidl.
verbose_string() :rtype: Text.

from_flyte_idl()

def from_flyte_idl(
    proto,
) -> e: RayCluster
Parameter Type
proto

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

:rtype: Text

to_flyte_idl()

def to_flyte_idl()

:rtype: flyteidl.plugins._ray_pb2.RayCluster

verbose_string()

def verbose_string()

:rtype: Text

Properties

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

flytekitplugins.ray.models.RayJob

Models _ray_pb2.RayJob

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
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

Methods

Method Description
from_flyte_idl()
serialize_to_string()
short_string() :rtype: Text.
to_flyte_idl()
verbose_string() :rtype: Text.

from_flyte_idl()

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

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

:rtype: Text

to_flyte_idl()

def to_flyte_idl()

verbose_string()

def verbose_string()

:rtype: Text

Properties

Property Type Description
is_empty
ray_cluster
runtime_env
runtime_env_yaml
shutdown_after_job_finishes
ttl_seconds_after_finished

flytekitplugins.ray.models.WorkerGroupSpec

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
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]

Methods

Method Description
from_flyte_idl() .
serialize_to_string()
short_string() :rtype: Text.
to_flyte_idl() :rtype: flyteidl.
verbose_string() :rtype: Text.

from_flyte_idl()

def from_flyte_idl(
    proto,
) -> e: WorkerGroupSpec
Parameter Type
proto

serialize_to_string()

def serialize_to_string()

short_string()

def short_string()

:rtype: Text

to_flyte_idl()

def to_flyte_idl()

:rtype: flyteidl.plugins._ray_pb2.WorkerGroupSpec

verbose_string()

def verbose_string()

:rtype: Text

Properties

Property Type Description
group_name
Group name of the current worker group.
:rtype: str
is_empty
k8s_pod
Additional pod specs for the worker node pods.
:rtype: K8sPod
max_replicas
Max replicas of the worker group.
:rtype: int
min_replicas
Min replicas of the worker group.
:rtype: int
ray_start_params
The ray start params of worker node group.
:rtype: typing.Dict[str, str]
replicas
Desired replicas of the worker group.
:rtype: int