Run local code remotely on a worker
See original GitHub issueI find myself often wanting to run code on a worker, rather than on my local client. This happens in a few settings:
- My workers have access to a data store that I don’t, so I need to call something like
dd.read_parquet
remotely (cc @martindurant @jcrist ) - My workers are far away from my client, so client-heavy operations like joblib or Hyperband incur a serious bottleneck from client-scheduler communication (cc @stsievert )
- My workers have hardware or libraries like GPUs/RAPIDS that I don’t have locally (cc @quasiben @kkraus14)
Today I can do this by writing a function and submitting that function as a task
def f():
import dask_cudf
df = dask_cudf.read_parquet("s3://...")
return df.sum().compute()
result = client.submit(f).result()
It might make sense to provide syntax around this to make it more magical (or it might not). We might do something like the following:
with dask.distributed.remote as result:
import dask_cudf
df = dask_cudf.read_parquet("s3://...")
result = df.sum().compute()
I know that @eriknw has done magic like this in the past. We could enlist this help. However, we may not want to do this due to the magical and novel behavior.
Issue Analytics
- State:
- Created 3 years ago
- Comments:35 (35 by maintainers)
Top Results From Across the Web
Execute arbitrary python code remotely - can it be done?
Take a look at PyRO (Python Remote objects) It has the ability to set up services on all the computers in your cluster,...
Read more >Visual Studio Code Remote Development
Visual Studio Code Remote Development allows you to use a container, remote machine, or the Windows Subsystem for Linux (WSL) as a full-featured...
Read more >Connect to a remote server from IntelliJ IDEA
On the IntelliJ IDEA welcome screen, select Remote Development. In the Run the IDE Remotely section, click SSH Connection. If you have the...
Read more >Remote Python Development in Visual Studio Code
Remote -Containers: develop in workspaces running inside of local docker ... The remote server allows Visual Studio Code to run extensions ...
Read more >Remote Debugging with SSH and VS Code - Render
A walkthrough of using Render SSH to remotely debug Node.js. ... to attach a debugger to the node process if it were running...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah great, I look forward to taking them for a spin. Thanks @eriknw!
Update:
afar
0.5 now supports IPython magics!instead of the original
More examples:
or
I think this is starting to get pretty nice.