Open
Description
Allowing tasks to specify a custom TaskGroup and TaskPrefix key—via annotations—would give us an easy path to work around the fact that Blockwise fusion produces task names that aren't meaningful to users, and can be confusing: dask/dask#8635.
In update_graph
:
- If a
task-group-key
annotation is set for a task, support passing it in as the group key instead of callingkey_split_group
on the task name. - If a
task-prefix-key
annotation is set for a task, use its value as the prefix key instead of callingkey_split
on the task name. - (Maybe?) if only
task-group-key
is given, but nottask-prefix-key
, calculate the prefix key fromtask-group-key
(this would require a new function likekey_split_from_group
). Not really necessary, just nice to not have to pass the semi-redundant annotation.
In update_graph
, if the TaskState is already in memory, the task-group-key
and task-prefix-key
annotations can be ignored, whether or not they match the group/prefix already associated with that task.
Once this is implemented, then we can have optimize_blockwise
set these annotations accordingly.