https://prefect.io logo
Title
j

John Ramirez

01/03/2020, 7:17 PM
Is it possible to give a custom name a task that is used in multiple places in the workflow to give a differentiation in
flow.visualize()
c

Chris White

01/03/2020, 7:20 PM
Hi John - if you’re using the functional API you can provide new task initialization arguments with each call via the
task_args
keyword. Search
task_args
on this page to see some examples: https://docs.prefect.io/core/tutorials/task-guide.html
:upvote: 1
n

nicholas

01/03/2020, 7:21 PM
Hi @John Ramirez! Yes it is possible, here's an example:
class YourTask(Task):
    def run(self):
        return

with Flow("Your Flow") as YourFlow:
  yourTask_1 = YourTask(name="yourTask_1")