I have several notebooks, using LocalCluster, and Gateway in a couple of them, and reuse some functions across notebooks. If a dask.delayed-object is defined to use a function imported from a .py-file in the /home/jovyan/-directory, the remote worker responds with ModuleNotFoundError
, which is understandable. However, defining the same function in a notebook-cell first, solves that, which is what I currently am doing.
This is not a problem, I just wanted to ask, is it possible to keep the functions in a .py-file and still use a remote cluster, instead of defining the same functions across notebooks?
If so, how do other users do this?
I read that installing packages with PipInstallPlugin is possible, but then I would have to make the functions into a package which I am not familiar with creating. But will gladly learn how to do that if that is the recommended solution.
Best,