Push a pure-python module to Dask workers

后端 未结 2 2021
南旧
南旧 2021-01-26 10:09

Is there an easy way in Dask to push a pure-python module to the workers?

I have many workers in a cluster and I want to distribute a local module that I have on my cl

2条回答
  •  时光取名叫无心
    2021-01-26 10:36

    Yes, use the Client.upload_file method.

    client.upload_file('myfile.py')
    

    This method will distribute the file and, if the file ends in .py or .egg will also import and reload the module on each of the workers.

提交回复
热议问题