Skip to content

First class Future object #6380

Description

@jakirkham

Currently with Distributed we have Futures in that context. However there doesn't exist a first class Future object within Dask itself. It would be useful to have a first class Future object within Dask. This would enable a wider set of algorithms and provided some needed flexibility for various problems people run into today.

First having a Future object would be useful in cases where we want to submit some work to start and then construct later operations with the knowledge that these results will soon become available (one example might be writing these to disk). Second this can be a useful way to prioritize elements of a workflow where we know what we want to prioritize (like working with large chunks of memory first). Third can help in cases where we want to interleave work between subtasks (recentering, normalizing, binning, etc.). Fourth this can be useful when the results of tasks are needed to more informatively generate new work (working with unknown chunks, selection based on data values, etc.). Fifth this can be a useful way of cutting down on large task graph handling issues (this is something other distributed libraries use #3514 (comment) ). Sixth use cases that involve some form of iteration where the intermediate result needs to be checked to see if the task is done. There may be more ways this functionality could be used, but hopefully this provides some ideas on where/how it might help.

Additionally have gone through the issue tracker and identified issues/cases where this would either solve or help solve the underlying problem. This is not necessarily comprehensive. Also some issues may require more work on top of this. However in all cases this seems to provide a meaningful base to build on. Here's the list:

Note this likely (though happy to be proven wrong) depends on moving to concurrent.futures as documented in issue ( #6220 ). May also need secede from PR ( dask/distributed#471 ) and rejoin from PR ( dask/distributed#1462 ).

Metadata

Metadata

Assignees

No one assigned

    Labels

    corediscussionDiscussing a topic with no specific actions yetneeds attentionIt's been a while since this was pushed on. Needs attention from the owner or a maintainer.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions