Skip to content

Local Python env Cluster (rebased)#9332

Open
dometto wants to merge 26 commits into
dask:mainfrom
dometto:venv_cluster
Open

Local Python env Cluster (rebased)#9332
dometto wants to merge 26 commits into
dask:mainfrom
dometto:venv_cluster

Conversation

@dometto

@dometto dometto commented Jul 20, 2026

Copy link
Copy Markdown

Rebase of #5013

I refer to explanation and discussion in that PR.

#5013 was never finished because merge conflicts appear. That seems a shame: the conflicts were relatively easy to solve. Opening this PR to see if the tests still pass.

I take no credit for @DPeterK's amazing work -- git adds me as a co-author for their commits because of the rebase, I hope that's ok.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    40 files  ±  0      40 suites  ±0   14h 51m 30s ⏱️ + 18m 20s
 4 164 tests +  5   3 981 ✅ + 4    178 💤 ±0   5 ❌ + 1 
81 039 runs  +100  76 780 ✅ +82  4 242 💤 +5  17 ❌ +13 

For more details on these failures, see this check.

Results for commit caa9705. ± Comparison against base commit 40fcd99.

♻️ This comment has been updated with latest results.

@dometto dometto mentioned this pull request Jul 20, 2026
3 tasks
@dometto

dometto commented Jul 20, 2026

Copy link
Copy Markdown
Author

One failing test remaining, plus some complaints from mypy. This looks fixable, but please let me know if you would still merge this if I got it to work!

Comment thread pyproject.toml
'''ignore:unclosed transport <_SelectorSocketTransport.*:ResourceWarning''',
'''ignore:unclosed transport <asyncio\.sslproto\..*:ResourceWarning''',
'''ignore:unclosed cluster SSHCluster.*:ResourceWarning''',
'''ignore:unclosed transport <_UnixReadPipeTransport.*:ResourceWarning''',

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

These warnings were being thrown by test_job_submission. I'm assuming it's safe to ignore them.

@dometto

dometto commented Jul 21, 2026

Copy link
Copy Markdown
Author

Tests mostly passing:

  • Seeing failures on macos and ubuntu, but in the ci1 segment -- the tests for this PR are in not ci1. These are presumbly unrelated, or flukes.
  • Seeings failures on windows; it may be that we need to add different ignore rules to pyproject.toml, or that LocalEnvCluster doesn't work on Windows at all.

The remaining linting (mypy) errors are not related to this PR.

Comment thread pyproject.toml
@dometto

dometto commented Jul 21, 2026

Copy link
Copy Markdown
Author

This makes me think we cannot support this on Windows, as subprocess support in Windows is only available using the ProactorEventLoop, and distributed appears to need the SelectorEventLoop on Windows.

Would it be ok to raise a NotImplementedError in LocalEnvCluster on Windows, and skip the CI tests?

@dometto

dometto commented Jul 21, 2026

Copy link
Copy Markdown
Author

Looking into subprocess support in Windows I saw that distributed now has a SubprocessCluster, which wasn't there when #5013 was opened. Wondering if LocalEnvWorker and LocalEnvScheduelr should subclass SubprocessWorker and SubprocessScheduler.

EDIT: this would require a refactor of Subprocess, so that subclasses can override the command (to insert the desired interpreter, and the set_env command prefix). At the moment, SubprocessScheduler also assumes that there is a scheduler_file, which LocalEnv does not. So perhaps inheritance here is not worth it.

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