acoustic-carpenter-78188
02/24/2023, 5:19 PMfrom flytekit import dynamic, task, workflow
@task()
def model_training(name: str) -> str:
print(f"Hello {name}")
return name
@task()
def hello_person(name: str) -> str:
print(f"Hello {name}")
return name
@dynamic
def people(names: List[str]) -> List[str]:
ack = []
for name in names:
ack.append(model_training(name=name))
return ack
@workflow()
def hello_people(names: List[str]) -> List[str]:
ack = people(names=names)
other_names = ["bob", "sue"]
for other_name in other_names:
hello_person(name=other_name).with_overrides(node_name=f"hello_{other_name}")
print(ack)
return ack
if __name__ == "__main__":
output = hello_people(names=["bob", "sue"])
type(output)
Expected behavior
The expected behavior is that the node names displayed in the graph match the node names displayed on the node list.
Additional context to reproduce
No response
Screenshots
image (3)▾
image (2)▾
acoustic-carpenter-78188
03/15/2023, 7:04 PM