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
| Name | Type | Description |
|---|---|---|
| specModel | *models.TaskSpec | The TaskSpec model object from the models package to be converted. This object contains the raw specification data. |
Returns
| Type | Description |
|---|---|
*flyteWorkflow.TaskSpec, error | A pointer to the converted flyteWorkflow.TaskSpec protocol buffer object and an error if the unmarshalling fails. |