acoustic-carpenter-78188
07/12/2023, 1:29 PM.with_overrides(node_name="foo")
. This is useful for dynamic tasks especially, because they get cryptic identifiers such as d1-n-dn0
by default, making it difficult to see in the UI for what iteration a dynamically created task is running.
If multiple sub-tasks are created, the name override works initially for all tasks, but then fails for any tasks after the initial one.
Expected behavior
Overridden task names are visible throughout in the UI.
Additional context to reproduce
from flytekit import Resources, WorkflowFailurePolicy, dynamic, task, workflow
@task(
limits=Resources(mem="500Mi"),
)
def some_task(
val: str,
):
print(val)
@dynamic(limits=Resources(mem="500Mi"))
def base_workflow():
# set up task promises
for val in ["one", "two", "three"]:
task_some_task = some_task(
val=val,
).with_overrides(node_name=f"{val}-some-task")
task_some_other_task = some_task(
val=val,
).with_overrides(node_name=f"{val}-some-other-task")
task_some_task >> task_some_other_task
@workflow( failure_policy=WorkflowFailurePolicy.FAIL_AFTER_EXECUTABLE_NODES_COMPLETE,
)
def wf():
base_workflow()
Screenshots
image▾