Mapping is an excellent tools, especially when needing to perform dynamic-like operations on large sets of data - however, the current user experience can leave a little to be desired.
Currently problems (as I see it) with mapped tasks are:
Mapped, it's possible to know the total number of mapped children that will appear. Mapped Child 38272 worked but Mapped Child 17368 failed.apply_map - they are clearly known as they appear in the visualisation, but I think viewing it as its own specific sub-schematic on a mapped child basis would be very useful.I think it would be useful to:
apply_mapped child DAG would be very useful.dynamic_name that would be used in preference on the UI would be a good idea IMO. This could be provided based on a Callable dynamic_name parameter on Task.map and apply_map that gets given the inputs and outputs a str. Hey @emcake - thanks for the feedback, these are really great suggestions; coincidentally we have line-of-sight to releasing your first point with some new Core / UI releases next week.
For point 2, we made a first pass attempt at that here but ran into some complexities as described in that PR. We are considering exposing a mutation that allows you to update the name of your task run dynamically, after it has been created, which we could then expose as a programmatic call in a mapped pipeline and display that in the UI as you describe.
For the UI specific feedback, we might want to migrate to a separate issue on the UI repo but in the meantime pinging @znicholasbrown for visibility.
Another related PR that furthers this: https://github.com/PrefectHQ/prefect/pull/3420
Hi @emcake - I'm going to close this issue as I believe most of your feedback has now been incorporated:
Mapped Children tab on the task run page of a mapped task that allows you to sort / filter for childrenapply_map call. I will still close this issue in favor of a more targeted issue for that request in the future.Thanks for the feedback and for your patience as we rolled these changes out!
Most helpful comment
Hi @emcake - I'm going to close this issue as I believe most of your feedback has now been incorporated:
Mapped Childrentab on the task run page of a mapped task that allows you to sort / filter for childrenapply_mapcall. I will still close this issue in favor of a more targeted issue for that request in the future.Thanks for the feedback and for your patience as we rolled these changes out!