<@U06RKAMK0UC> how to set different name to a task...
# ask-ai
s
@ancient-wolf-19325 how to set different name to a task aside from what the method is called? I'm using flyte v1
a
In Flyte v1, you can set a different name for a task (other than the Python function name) by using the name parameter in the @task decorator. For example, @task(name="custom_task_name") will register the task with the specified name, regardless of the function name. This is useful for stable identifiers and better readability in the UI and downstream consumption. This approach is documented and supported in Flyte v1, as discussed in community issues and examples. Note that the fully qualified task name will be module.custom_task_name unless further customized during registration or with additional parameters. For workflows, a similar name parameter can be used in the @workflow decorator. If you need to override the node name at invocation time (i.e., how the task appears in the workflow graph), Flyte v1 does not natively support this for tasks, but you can use with_overrides(node_name="...") for more control in some cases, though this is more commonly used in dynamic workflows and may have limitations in v1. See the discussion in Flyte issue #2441 and Flyte issue #6552b1b9. Would you like more detail or code examples for this? Sources: - Flyte issue #2441 - Flyte issue #3092 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.