Skip to main content

ToReplicaSpec

No overview available.

def ToReplicaSpec(
ctx: context.Context,
taskCtx: pluginsCore.TaskExecutionContext,
primaryContainerName: string
) - > *kubeflowv1.ReplicaSpec, error

Converts a task context into a Kubeflow ReplicaSpec, which defines the desired state for a set of pods in a distributed job. This function is used to configure the Kubernetes resources required to run a Flyte task.

Parameters

NameTypeDescription
ctxcontext.ContextThe context for the operation, used for cancellation and deadlines.
taskCtxpluginsCore.TaskExecutionContextThe execution context of the Flyte task, providing metadata and configuration for the task.
primaryContainerNamestringThe desired name for the primary container within the generated PodSpec. This overrides any existing primary container name.

Returns

TypeDescription
*kubeflowv1.ReplicaSpec, errorA pointer to a kubeflowv1.ReplicaSpec object representing the Kubernetes replica specification, or an error if the conversion fails.