-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Description
Environment info
Operating System: Ubuntu 16.04 LTS
Compiler:
Package used (python/R/jvm/C++): python
xgboost version used: 0.6
Steps to reproduce
-
Define custom learning rate function or provide as list to xgboost.cv method. Attaching the error snippet as image.

-
The exact code snippet is
xgtest = xgb.DMatrix(x_test)
def get_learning_rate(i, n):
if i<=1000:
return 0.01
return 0.001
lrl = [1]*5000
for i in range(5000):
lrl[i] = 0.01 if i<=1000 else 0.00
res = xgb.cv(params, xgtrain, num_boost_round=5000, nfold=5,
early_stopping_rounds=50, maximize=False,
callbacks=[xgb.callback.reset_learning_rate(lrl)])
What have you tried?
- Read the source code of callbacks.py and it turns out that cvpack object in env.cvfolds is getting to be None
- Searched through all the issues in this repository and stackoverflow, and couldn't find a similar one, t the best of my reach.
I hope I am doing everything correct, hence I would appreciate feedback if its some bug or human error. Thanks in Advance and cheers 👍
Metadata
Metadata
Assignees
Labels
No labels