Skip to main content

ToTaskSpec

Converts a TaskSpec model to a proto TaskSpec.

def ToTaskSpec(
specModel: *models.TaskSpec
) - > *flyteWorkflow.TaskSpec, error

Converts a TaskSpec model from the models package into a TaskSpec protocol buffer object. This function is used to transform the internal representation of a task specification into a format suitable for Flyte workflows.

Parameters

NameTypeDescription
specModel*models.TaskSpecThe TaskSpec model object from the models package to be converted. This object contains the raw specification data.

Returns

TypeDescription
*flyteWorkflow.TaskSpec, errorA pointer to the converted flyteWorkflow.TaskSpec protocol buffer object and an error if the unmarshalling fails.