Fix filtering callable objects in skl xgb param. (#6466)
Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
@@ -398,7 +398,7 @@ class XGBModel(XGBModelBase):
|
||||
'importance_type', 'kwargs', 'missing', 'n_estimators', 'use_label_encoder'}
|
||||
filtered = dict()
|
||||
for k, v in params.items():
|
||||
if k not in wrapper_specific:
|
||||
if k not in wrapper_specific and not callable(v):
|
||||
filtered[k] = v
|
||||
return filtered
|
||||
|
||||
|
||||
Reference in New Issue
Block a user