Skip to content

Runners framework #28

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

Merged
merged 46 commits into from
Apr 5, 2025
Merged

Runners framework #28

merged 46 commits into from
Apr 5, 2025

Conversation

ben-denham
Copy link
Owner

@ben-denham ben-denham commented Mar 30, 2025

  • Set up a framework for RunnerBackend classes that can implement different strategies for executing tasks (laying the groundwork for distributed task execution with Ray)
  • Implement spawn and fork backends to cover existing process-based execution paradigms.
  • The process-based backends no longer rely on concurrent.futures, which made use of threading that required all subprocesses to be forked up front before any task execution. By no longer relying concurrent.futures, the fork backend can use shared/forked memory to share the results of earlier tasks with later tasks. Also, the fork backend now implicitly uses shared memory to share task context with subprocesses.

…y for results and context, and add SpawnProcessRunner that copies context and needed results into subprocess
…rove performance when a worker can directly add to results_map)
…ts depending on whether tasks are cached or not, and it will complicate or constrain optimisation of result memory management.
@ben-denham
Copy link
Owner Author

ben-denham commented Mar 30, 2025

Notes from development:

Plan:

  • Mac and Windows will use spawn, where memory must be copied from parent to child and from child to parent.
  • Linux to default to fork, where memory can be shared from parent to child, but must still be copied back from child to parent.
  • Re-consider potential benefits of subinterpreters when they become available.

@ben-denham ben-denham merged commit 9782434 into main Apr 5, 2025
3 checks passed
@ben-denham ben-denham deleted the runners-framework branch April 25, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant