Hey there, is there a way to rename a task so that...
# ask-the-community
g
Hey there, is there a way to rename a task so that it has the same implementation but a different name in a workflow? Something like rename perhaps?
Copy code
@task
def process_data(data: List[float]) -> list[Float]:
    ...

@workflow
def wf(data1: List[float], data2: List[float]) -> None:
    processed_data1 = process_data(data=data1).rename("process_data1")
    processed_data2 = process_data(data=data2).rename("process_data2")
    ...
k
Not the task but the node in the workflow absolutely
g
That’s what I mean. How do you rename a node in the workflow?
g
I did come across with_overrides but wasn’t sure where to look for specific attributes. Would that be
.with_overrides(name="my_name")
.
with_overrides(task_name="my_name")
?
k
Name=
Cc @Nikki Everett
g
It seems to work with
.with_overrides(name="my_name")
snake case
n
looks like there's already an issue to update that section of the docs, so i can comment there. we should probably just go ahead and document all parameters of
with_overrides
in that section, even though the focus is technically on resource allocation