Dask Client.restart() Behavior


I am wondering about dask Client.restart() behavior - specifically if it reloads new code on the backend if, for example, a package is updated to a newer version.

The reason I am asking is because I am exploring ways to allow dask workers to run on new code version without fully restarting. I would really appreciate it if there is any suggestions / if this is a common problem.

Thanks! I really appreciate all the work that dask community has done to maintain this awesome codebase.

Hi @longshort,

Well I just did the test:

  • Start a Dask cluster using Client()
  • call client.get_versions(), Numpy is at 1.24.4
  • pip install Numpy 1.26
  • call client.restart()
  • call client.get_versions() again, Numpy is at 1.26.

So in this case, client.restart does take account of newer packages in an environment!