I have a large set of vectors that were computed on different data, thus they reside on different workers. Is the following code the most efficient?
grads = [client.submit(compute_grad, x) for x in xs] # list of futures
gradsum_future = client.compute(db.from_sequence(grads).fold(operator.add))
gradsum = client.gather(gradsum_future)