client.submit not working with client.upload_file after first time
See original GitHub issueBelow are my local and cloud Dask version.
Dask version: 2.14 Distributed version: 2.14
We have a production Dask cluster in GKE, and shared among our engineers. Now, we want to create a python script for boilerplate purpose, simply name, boilerplate.py
,
def inc(x):
if x > 10:
raise Exception('x > 10')
return x + 1
And our client script,
from dask.distributed import Client
import boilerplate as bp
bootstrap = # proxied
client = Client(bootstrap)
client.upload_file('boilerplate.py')
client.submit(bp.inc,7).result() # no error
client.submit(bp.inc,11).result() # got error
Now we fixed boilerplate.py
,
def inc(x):
if x > 20:
raise Exception('x > 20')
return x + 1
And rerun client script to reupload fixed boilerplate.py
,
from dask.distributed import Client
Exception: x > 10
bootstrap = # proxied
client = Client(bootstrap)
client.upload_file('boilerplate.py')
client.submit(bp.inc,7).result() # no error
client.submit(bp.inc,11).result() # got error
It is still same exception,
Exception: x > 10
The problem here, we cannot restart our Dask cluster, it might disturb other important tasks. It might seems got some caching layer here, this is only happened if we use file_upload
+ submit
, if we use file_upload
+ run
, it use latest update boilerplate.py
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to properly use dask's upload_file() to pass local code to ...
The upload_file method only uploads the file to the currently available workers. If a worker arrives after you call upload_file then that worker ......
Read more >C# client: file upload problem - ServiceStack Customer Forums
Hi, I'm trying to upload a file, but for some reason the service gets only the first. After upload file called dispose?
Read more >10423: Drake Portals - Uploading Documents for Client Pickup
On the Files tab in the Drake Portals pane, select which Folder into which you want to upload the file. For example, choose...
Read more >The common mistake people make with boto3 file upload
Boto3 users encounter problems too while trying to use Boto3 File Upload, ... Here's the code to upload a file using the client....
Read more >Handling File Uploads With Flask - miguelgrinberg.com
From a high-level perspective, a client uploading a file is treated the same as any other form data submission. In other words, you...
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
Let us know if you’re able to do more debugging.
Given the complexities here, I don’t really see how Dask can support re-uploading modules with
upload_file
. I’d recommend investigating alternative ways of doing this.We can reopen if you find a specific issue or a solution that works well generally.
@TomAugspurger