Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flow control for worker task submission #239

Open
tomwhite opened this issue Jun 28, 2023 · 1 comment
Open

Flow control for worker task submission #239

tomwhite opened this issue Jun 28, 2023 · 1 comment

Comments

@tomwhite
Copy link
Member

For very large computations when the number of tasks for an array is much greater than the number of workers, it may be desirable to have more control over task submission in the client, so a large number of submissions doesn't overwhelm the client (memory) or the backend service.

Lithops' map function, for example, will materialize all the inputs before submission. So in this case it might be appropriate to batch the submissions. Note that Lithops' wait function can wait on futures from different map submissions, so it should be possible to implement flow control this way.

For Modal, which has an async interface, it may be possible to just stream the inputs as they are produced on the client - it would need some experimentation.

@tomwhite
Copy link
Member Author

I ran a small experiment with Modal and demonstrated that results are returned to the client before all the input is consumed.

tomwhite added a commit that referenced this issue Jun 29, 2023
(although Lithops will still materialize internally, see #239)
tomwhite added a commit that referenced this issue Jul 1, 2023
(although Lithops will still materialize internally, see #239)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant