-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
I love using dask.imperative.delayed as a decorator to hide the daskyness from the driver code, but the names generated for dask.dot.dot_graph leave something to be desired. Its often easy to compute unique names within the delayed function, e.g.:
@delayed
def run(config):
__task_name = "run_" + config["job_name"]
res = do_stuff(config)
return res
which can be done with a wrapper:
def run(config):
task_name = "run_" + config["job_name"]
return delayed(_run, name=task_name)(config)
def _run(config)
res = do_stuff(config)
return res
Any way to get rid of the wrapper step?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels