https://prefect.io logo
Title
i

Ibrahim Sherif

07/06/2022, 3:47 PM
Hello How can I rename a task output ? Is it possible to use with it a task nout=3 ?
k

Kevin Kho

07/06/2022, 3:48 PM
Rename a task run? What do you mean by rename output?
i

Ibrahim Sherif

07/06/2022, 3:52 PM
For example: I have a task (preprocess) that outputs two results (preprocess[0], preprocess[1]). I want to rename them to (blues, reds).
k

Kevin Kho

07/06/2022, 3:54 PM
Ah I see what you mean. I don’t think this can be done with
nout
.
i

Ibrahim Sherif

07/06/2022, 3:55 PM
Is it possible if it is just a normal task ?
k

Kevin Kho

07/06/2022, 3:57 PM
Yeah
@task(task_run_name=...)
or
@task(name=...)
i

Ibrahim Sherif

07/06/2022, 4:00 PM
Let me give you another example. I have 3 tasks where each output is added to a list. The names of the output of task are just arg1, arg2, arg3. I would like to add better names.
k

Kevin Kho

07/06/2022, 4:02 PM
I know what you mean. I don’t think it can be done because the task run name does not take a list.
i

Ibrahim Sherif

07/06/2022, 4:05 PM
I was reading an issue regarding it and someone mentioned that it was possible. I think I misunderstood them. https://github.com/PrefectHQ/prefect/issues/3789#issuecomment-789296504
k

Kevin Kho

07/06/2022, 4:09 PM
Based on this, I don’t think you can yet. I think he meant
manual
as in we made a manual change on our side
i

Ibrahim Sherif

07/06/2022, 4:14 PM
Aha too bad. Thank you though Kevin for your help.