https://flyte.org logo
#ask-the-community
Title
# ask-the-community
x

Xinzhou Liu

01/29/2024, 11:02 PM
Hello folks! I’m trying to download outputs of a specific task in a workflow? I know we can do that by using
FlyteRemote.get
, given the node id (e.g.,
n1
,
n2
,
n2-0-dn0
,
n2-0-dn1
, etc). Is there a way of getting those node ids using Python?
k

Ketan (kumare3)

01/30/2024, 2:01 AM
You can simply use Flyte data uri
s

Samhita Alla

01/30/2024, 6:00 AM
the code snippets to fetch the input/output data should be available on the UI:
x

Xinzhou Liu

01/30/2024, 5:14 PM
Thanks, guys! I was looking for a programmatic way of doing that instead of checking UI. I think this can be challenging since the dynamic nodes are determined at runtime?
s

Samhita Alla

01/30/2024, 5:32 PM
should be possible. you can retrieve node ids using `list_node_executions`; e.g.,
Copy code
dynamic_node_exec_id = remote.client.list_node_executions(exec.id)[0][3].id
x

Xinzhou Liu

01/30/2024, 5:35 PM
Oh, that’s cool! Does it map the node path to the task name? For example, I have nested task paths: •
task1
-> n0 •
task1.subtask1
-> n0-0-dn0 •
task1.subtask2
-> n0-0-dn1
s

Samhita Alla

01/30/2024, 5:37 PM
the node name depends on the execution order. if
subtask1
runs before
subtask2
, then yes, it should map to
dn0
and
dn1
respectively.
x

Xinzhou Liu

01/30/2024, 5:39 PM
Neat! I’ll try that out. Thanks!
@Samhita Alla btw, would i be able to retrieve the outputs of the subtasks from previous run, if the parent task is cached?
k

Ketan (kumare3)

01/30/2024, 9:45 PM
yes
x

Xinzhou Liu

01/30/2024, 9:46 PM
Awesome, I’m excited to try it out!
4 Views