Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dagger @spawn can't launch workers from Pluto #1792

Open
Oblynx opened this issue Dec 28, 2021 · 4 comments
Open

Dagger @spawn can't launch workers from Pluto #1792

Oblynx opened this issue Dec 28, 2021 · 4 comments
Labels
other packages Integration with other Julia packages

Comments

@Oblynx
Copy link

Oblynx commented Dec 28, 2021

Hi! I try to use Dagger.jl inside a Pluto cell. However, it can't seem to spawn even 1 worker when used from Pluto, while the same code runs with plain Julia.

Here's the Pluto notebook: https://gist.github.com/Oblynx/a0846ac1d1d021b52d52fa675c48aaa1

Here's the error message in Pluto:

On worker 1:

KeyError: key Dagger [d58978e5-989f-55fb-8d15-ea34adc7bf54] not found

2021-12-28_22:49:09

@pankgeorg
Copy link
Collaborator

This is related to #300, and unfortunately it is not trivial to fix soon!

@Oblynx
Copy link
Author

Oblynx commented Dec 30, 2021

Oh this is indeed unfortunate! I wonder why Distributed can't nest.

@pankgeorg
Copy link
Collaborator

Pluto server runs on process 1 and the notebooks get a worker number. In general, apps that use Distributed assume they are process 1 and their children are processes 2:N. When you run from pluto, both assumptions break, as Distributed only has one nesting level.

@Pangoraw
Copy link
Collaborator

It seems that Dagger is trying to spawn the task from process id 1, so you can @spawn if you also import Dagger in the process where you launch Pluto from:

using Pluto, Dagger
Pluto.run()

I was then able to make your example work but note that there may be other issues down the line because of #300 as @pankgeorg said !

@fonsp fonsp added the other packages Integration with other Julia packages label Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other packages Integration with other Julia packages
Projects
None yet
Development

No branches or pull requests

4 participants