How to use the flyteidl.core.workflow_pb2 function in flyteidl

To help you get started, we’ve selected a few flyteidl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.WorkflowMetadataDefaults
        """
        return _core_workflow.WorkflowMetadataDefaults(
            interruptible=self.interruptible_
        )
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.Node
        """
        return _core_workflow.Node(
            id=self.id,
            metadata=self.metadata.to_flyte_idl() if self.metadata is not None else None,
            inputs=[i.to_flyte_idl() for i in self.inputs],
            upstream_node_ids=self.upstream_node_ids,
            output_aliases=[a.to_flyte_idl() for a in self.output_aliases],
            task_node=self.task_node.to_flyte_idl() if self.task_node is not None else None,
            workflow_node=self.workflow_node.to_flyte_idl() if self.workflow_node is not None else None,
            branch_node=self.branch_node.to_flyte_idl() if self.branch_node is not None else None
        )
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.Alias
        """
        return _core_workflow.Alias(var=self.var, alias=self.alias)
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.TaskNode
        """
        return _core_workflow.TaskNode(reference_id=self.reference_id.to_flyte_idl())
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.IfBlock
        """
        return _core_workflow.IfBlock(condition=self.condition.to_flyte_idl(),
                                      then_node=self.then_node.to_flyte_idl())
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.WorkflowMetadata
        """
        workflow_metadata = _core_workflow.WorkflowMetadata()
        if self._queuing_budget:
            workflow_metadata.queuing_budget.FromTimedelta(self.queuing_budget)
        if self.on_failure:
            workflow_metadata.on_failure = self.on_failure
        return workflow_metadata
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.BranchNode
        """
        return _core_workflow.BranchNode(if_else=self.if_else.to_flyte_idl())
github lyft / flytekit / flytekit / models / core / workflow.py View on Github external
def to_flyte_idl(self):
        """
        :rtype: flyteidl.core.workflow_pb2.WorkflowNode
        """
        return _core_workflow.WorkflowNode(
            launchplan_ref=self.launchplan_ref.to_flyte_idl() if self.launchplan_ref else None,
            sub_workflow_ref=self.sub_workflow_ref.to_flyte_idl() if self.sub_workflow_ref else None
        )