Implementing a WorkerPlugin for uploading a directory containing Python code or at least updating docs#7067
Open
guillaumeeb wants to merge 1 commit intodask:mainfrom
Open
Conversation
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files ±0 15 suites ±0 5h 58m 30s ⏱️ - 26m 56s For more details on these failures, see this check. Results for commit 4c66702. ± Comparison against base commit 17c70e9. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi everyone,
Just wanted to discuss the UploadDirectory plugin, and propose some changes at least to documentation regarding it.
This is both an issue and a PR, as I dug a bit into plugins and tried implementing one, I thought it would be easier to discuss with a proposal.
So I am in a situation where I work on an under development Python project (it's actually https://github.com/pangeo-data/benchmarking that I'm reviving), I need to test some code on a dask-gateway cluster. This project was developed on HPC Centers, so it assumed a shared folder where the code is available for every workers, which is not the case in the Cloud. The project folder look like this:
Quite simple!
What I needed was to be able to run something like:
On the workers.
Searching around, I came into https://distributed.dask.org/en/stable/plugins.html#distributed.diagnostics.plugin.UploadDirectory and some explanations in https://docs.coiled.io/user_guide/tutorials/upload_file_to_coiled.html#upload-a-local-directory.
I though that was it (and I discovered later this was actually it 😄) but I was not able to get it working. I was either trying to upload the wrong directory (e.g.
benchmarks), either not giving the correct arguments (noupdate_pathandrestartkwargs). So I developed theUploadDirectoryWorkerversion proposed here as an intermediate.When preparing this PR, I discovered on the distributed tests that I did not try everything, the documentation I sought was here: https://github.com/dask/distributed/blob/main/distributed/tests/test_client.py#L7032.
In order to make my uploaded code able to be imported, I have to use:
With the proposed
WorkerPlugin, it also works with:So I'm happy to just propose some clarifications in the docs (but I'm not sure were except in the docstring?), and I wanted to hear if you think adding this
UploadDirectoryWorkerplugin is useful or not.