Hey, im currently trying to get some statistics o...
# flyte-support
a
Hey, im currently trying to get some statistics of executions / task_duration / outputs in python...
Copy code
executions = remote.recent_executions(project=PROJECT, domain=DOMAIN, limit=1000)

for execution in executions:
    name = execution.spec.launch_plan.name

    info = remote.fetch_execution(domain=DOMAIN, project=PROJECT, name=execution.id.name)

    tmp = remote.sync_node_execution(execution="How do i get this info?")
I can fetch the workflow execution with input and output and i see the references to tasks /nodes but im not able to fetch the exact node execution information for the task.
flytectl get execution -p flytesnacks -d development foobar --nodeID n0 -o yaml
seems to print the information im seeking in python. Does anyone know how to query this with the python client directly?
a
Can you explore the info in the ExecutionClosure? You should be able to find
execution.closure.duration
or
execution.closure.outputs
.
a
This is what i want to see in the end yes. I can see it for info.closure but im interested in the second running node. Of the workflow and its outputs and runtime. My question is how to get to the task/node information of the workflow queried in the snipped I find information about the nodes in there as well as tasks but nothing is providing the execution information from what i can find.
the python interface does not seem to have a simple call ontop like the ctl has with nodeID
a
You might want to explore
info.flyte_workflow.flyte_nodes
. I think inputs at least can be found at
info.flyte_workflow.flyte_nodes[0].inputs
a
Thanks for the quick answer. The objects found under flyte_nodes are from type FlyteNode and not FlyteNodeExecution. The data contains only the template input not the values nor any information to the runtime our outputs. My hopes where to somehow fetch the node execution using the node object but until now without success.