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

DaskExecutor #943

Merged
merged 24 commits into from
Oct 11, 2023
Merged

DaskExecutor #943

merged 24 commits into from
Oct 11, 2023

Conversation

normanrz
Copy link
Member

@normanrz normanrz commented Sep 14, 2023

Description:

  • Adds a DaskExecutor that can use an existing dask cluster + scheduler to distribute computation. We can use dask to easily schedule workloads across on-demand-created VMs
  • Refactors Executor type to a protocol that should make the interface more explicit and therefore better enforceable by mypy
  • Upgrades dependencies in cluster_tools and webknossos

How to test

  • Start a dask scheduler python -m dask scheduler
  • Start at least one dask worker python -m dask worker tcp://10.0.0.2:8786 (can be on the same machine)
  • Open a Python shell and run:
import webknossos as wk
from cluster_tools import get_executor

m = wk.Dataset.open("path/to/l4_sample").get_layer("color").get_mag("1")
with get_executor("dask", address="10.0.0.2:8786") as exc:
  m.map_chunk(lambda view: view.read().mean(), executor=exc)

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • Updated Changelog
  • Added / Updated Tests

@normanrz normanrz self-assigned this Sep 26, 2023
@normanrz normanrz marked this pull request as ready for review September 26, 2023 17:28
Copy link
Member

@philippotto philippotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome stuff 👍 testing went also very smooth 🥇

there might be some potential to DRY things between the cluster executor and the dask executor, but I guess it's alright for now.

webknossos/Changelog.md Outdated Show resolved Hide resolved
cluster_tools/Changelog.md Show resolved Hide resolved
@normanrz normanrz merged commit 14efb6f into master Oct 11, 2023
29 checks passed
@normanrz normanrz deleted the cluster-dask branch October 11, 2023 17:04
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.

2 participants