kingfengji / mGBDT

This is the official clone for the implementation of the NIPS18 paper Multi-Layered Gradient Boosting Decision Trees (mGBDT) .
101 stars 25 forks source link

Problem with Pop #7

Open eladmw opened 3 years ago

eladmw commented 3 years ago

/opt/conda/lib/python3.7/site-packages/joblib/parallel.py in (.0) 254 with parallel_backend(self._backend, n_jobs=self._n_jobs): 255 return [func(*args, **kwargs) --> 256 for func, args, kwargs in self.items] 257 258 def len(self):

/kaggle/working/mGBDT/lib/mgbdt/model/online_xgb.py in fit_increment(self, X, y, num_boost_round, params) 13 for k, v in extra_params.items(): 14 params[k] = v ---> 15 params.pop("n_estimators") 16 17 if callable(self.objective):

KeyError: 'n_estimators'

eladmw commented 3 years ago

It was that the item "n_estimators" wasn't in the dictionary. I may replace this with del(params["n_estimators"]). Or simply make sure that some version of "n_estimators" is in the dictionary before removal