joblib / loky

Robust and reusable Executor for joblib
http://loky.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
528 stars 45 forks source link

Stdout is not captured inside Jupyter notebook due to buffering #372

Open lesteve opened 1 year ago

lesteve commented 1 year ago

In a scikit-learn context, the GridSearchCV does not produce output to show its progress: https://github.com/scikit-learn/scikit-learn/issues/22849

This seems like an issue only for the loky backend, there is a reproducer with joblib here: https://github.com/scikit-learn/scikit-learn/issues/22849#issuecomment-1068947522

Haven't taken the time to put together a snippet with only loky but I assume this is not that hard.

A work-around is to force the stdout/stderr to be unbuffered e.g. by setting PYTHONUNBUFFERED=1