It is quite tricky and annoying to use Distributed.jl in packages. This post could help: Distributed computing for functions in scripts inside a local module? - #5 by dave.f.kleinschmidt and here is a package that does use Distributed: GitHub - beacon-biosignals/OndaBatches.jl: Local and distributed batch loading for Onda datasets. When Distributed creates workers it does not activate the same Julia environment so they don’t have access to the source code; remotecall_eval
is one way to activate the environment and load the right code. Instead of include
ing code on the workers you should activate the package and load it with using
.