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

Printed output not displayed when using joblib in jupyter notebook #402

Closed
zaccharieramzi opened this issue May 7, 2019 · 13 comments
Closed

Comments

@zaccharieramzi
Copy link

So I am using joblib to parallelize some code and I noticed that I couldn't print things when using it inside a jupyter notebook.

I tried using doing the same example in ipython and it worked perfectly.

Here is a minimal (not) working example to write in a jupyter notebook cell

from joblib import Parallel, delayed
Parallel(n_jobs=8)(delayed(print)(i) for i in range(10))

So I am getting the output as [None, None, None, None, None, None, None, None, None, None] but nothing is printed.

Actually, checking the logs of the notebook process, I noticed that the prints happen there. I would like the prints to happen in the notebook, not the logs of the notebook process.

I have written an SO issue as well.

From what I understood discussing with @tomMoral, it may be related to the way the IO handler is passed to the child processes.

@leliel12
Copy link

+1

1 similar comment
@ZGainsforth
Copy link

+1

@spizwhiz
Copy link

+1

@cossio
Copy link

cossio commented Jul 6, 2021

I am hitting this issue now. Any updates?

@GF-Huang
Copy link

2 years nobody care?

@ccordoba12
Copy link
Member

This should have been fixed in ipykernel 6. Please try again.

@CamHolman
Copy link

+1

@zaccharieramzi
Copy link
Author

@ccordoba12 it indeed works now with ipykernel==6.16.0.
Closing this.

@gioxc88
Copy link

gioxc88 commented Dec 12, 2022

ipykernel 6.18.0 and it doesn't work

@jmigual
Copy link

jmigual commented Jan 17, 2023

ipykernel 6.20.1 still failing

@cfd0
Copy link

cfd0 commented Mar 20, 2024

ipykernel 6.28.0 still failing

@davidbrochart
Copy link
Collaborator

ipykernel v6.29.0 improved the situation for threads, but I think joblib uses processes?
Maybe @krassowski has ideas, since he did all the work in #1186.

@nshaff3r
Copy link

ipykernel 6.29.4 working on vs code jupyter extension but not a jupyter notebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests