# How to show progress of sklearn.multioutput.MultiOutputRegressor and XGBRegressor?

Is it possible to show the training progress of the MultiOutputRegressor in sklearn? When a huge dataset is processed, my program runs a long time and I have no clue how long it will take. I have shortened my program to a minimal working example below.

import numpy as np
from sklearn.multioutput import MultiOutputRegressor
import xgboost as xgb

df = np.arange(50).reshape(10,5)
train = df[:8]
test = df[8:]
X_train = train[:,0:-2]
X_test  = test[:,0:-2]
y_train = train[:,-2:]
y_test  = test[:,-2:]

eval_set = [(X_test, y_test)]
multioutputregressor = MultiOutputRegressor(xgb.XGBRegressor(eval_set=eval_set, verbose_eval=True))
multioutputregressor.fit(X_train, y_train)
predictions = multioutputregressor.predict(X_test)
print(predictions)

• There is no built-in progress bar for scikit learn and most of the ML algorithms. There are might be a solution using tqdm package see :github.com/scikit-learn/scikit-learn/issues/7574, but I am not sure it will work on MultiOutputRegressor or not!! – TwinPenguins Aug 9 '18 at 9:34
• Thanks, I tried this but unfortunately it doesn't work in my case, since XGBRegressor doesn't have a partial_fit method. – Dennis Aug 9 '18 at 15:47

For example, you can print information of when the separate threads are starting and stopping in MultiOutputEstimator.fit (inherited and thus reused in MultiOutputRegressor), lines 167-169. Also, consider the tip in the documentation of the n_jobs parameter:
If 1 is given, no parallel computing code is used at all, which is useful for debugging.

You can use a similar approach to expand the debugging in XGBModel.fit (the basis of XGBRegressor).