5

I have a script that uses scikit-learn's parallel features (implemented by the joblib library). Typically I run it with higher verbosity, so that I can monitor the progress:

grid = GridSearchCV(estimator, params, cv=5, n_jobs=4, verbose=50)

When using a normal Python console, the messages from the Parallel library get printed to the console as they occur, like so:

[Parallel(n_jobs=4)]: Done 4 jobs | elapsed: 32.8s [Parallel(n_jobs=4)]: Done 2 jobs | elapsed: 33.7s

However, when I'm running the script in an IPython notebook, it looks like these messages are getting buffered while the job runs, and only outputs after it has completed or I terminate the kernel.

Is there any way to get it to display in real time in the notebook?

hgcrpd
  • 1,820
  • 3
  • 19
  • 32
  • Seems like there are a couple of related questions, but none with an answer that works for my case: http://stackoverflow.com/questions/16430827/printing-to-main-stdout-in-ipython-notebook-from-other-parallel-engines?rq=1 and http://stackoverflow.com/questions/15289168/printing-to-stdout-in-ipython-parallel-processes?rq=1 – hgcrpd Mar 05 '14 at 08:28

0 Answers0