Hi, trying out some simple map reduce stuff on lat...
# prefect-community
s
Hi, trying out some simple map reduce stuff on latest prefect on a dask cluster. Should I use task.submit() or can I also use task.map()?
1
k
You can use task use task.map
s
Is there any difference in terms of what happens in the backend? Or are they identical in the sense that map just hides away the for loop?
k
I believe map just hides away the for loop. But maybe you can answer this better than me @Zanie, @Anna Geller
z
map
is a bit more performant than a for loop as we gather all upstream dependencies concurently.
🙏 1
If you’re calling
map
without any upstream tasks as inputs, it’s probably going to be the same as a for loop. I believe in the future we’ll collapse mapped tasks in the UI and such to make the graph clearer.
s
Thanks!