Open multimeric opened 2 months ago
Hi @multimeric ,
awesome, thanks for the feedback! I have no idea if this technically feasible. Under the hood we are using dask graphs and strings as keys because napari layers have string names. Saying that, if you could implement your proposal in a way that this plugin still works with napari and code generation with the napari-assisrant, I'd be happy to merge your pull-request.
Let me know if I can do anything to support you!
Best, Robert
Currently the napari workflow format uses strings as arguments, either to name tasks that they depend on, or as literal strings. If the workflow is "complete", ie all the dependencies are specified, then this is not a big issue: any strings that correspond to a task name are assumed to be dependencies, otherwise they are strings. However, it does mean that any determination of inputs is impossible. In the following task, I have one task (
strlen
) that just calculates the length of"some_string"
and has no inputs. I also havedimensions
which returns the shape of an unspecified image. However if I try to work out which inputs the workflow needs to run,roots()
thinks that both are inputs:The only true result here should be
input_img
.I think it would be better to use a special type to either mark literal strings or task connections, in order to disambiguate this scenario. For example something like this would be ideal: