Ejemplo n.º 1
0
 def get_child_executions(self, filters=None):
     """
     :param list[flytekit.models.filters.Filter] filters:
     :rtype: dict[Text, flytekit.common.nodes.SdkNodeExecution]
     """
     client = _FlyteClientManager(
         _platform_config.URL.get(),
         insecure=_platform_config.INSECURE.get()).client
     return {
         v.id.node_id: v
         for v in _iterate_node_executions(
             client,
             task_execution_identifier=self.sdk_task_execution.id,
             filters=filters)
     }
Ejemplo n.º 2
0
    def get_child_executions(self, filters=None):
        """
        :param list[flytekit.models.filters.Filter] filters:
        :rtype: dict[Text, flytekit.common.nodes.SdkNodeExecution]
        """
        from flytekit.common import nodes as _nodes

        if not self.is_parent:
            raise _user_exceptions.FlyteAssertion("Only task executions marked with 'is_parent' have child executions.")
        client = _flyte_engine.get_client()
        models = {
            v.id.node_id: v
            for v in _iterate_node_executions(client, task_execution_identifier=self.id, filters=filters)
        }

        return {k: _nodes.SdkNodeExecution.promote_from_model(v) for k, v in _six.iteritems(models)}
Ejemplo n.º 3
0
    def get_child_executions(self, filters=None):
        from flytekit.control_plane import nodes as _nodes

        if not self.is_parent:
            raise _user_exceptions.FlyteAssertion(
                "Only task executions marked with 'is_parent' have child executions."
            )
        client = _flyte_engine.get_client()
        models = {
            v.id.node_id: v
            for v in _iterate_node_executions(
                client, task_execution_identifier=self.id, filters=filters)
        }

        return {
            k: _nodes.FlyteNodeExecution.promote_from_model(v)
            for k, v in models.items()
        }
Ejemplo n.º 4
0
 def get_node_executions(self, filters: List[_filter_models.Filter] = None) -> Dict[str, _nodes.FlyteNodeExecution]:
     client = _flyte_engine.get_client()
     return {
         node.id.node_id: _nodes.FlyteNodeExecution.promote_from_model(node)
         for node in _iterate_node_executions(client, self.id, filters=filters)
     }