-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Description
commit: 4912c1f
Python: 3.6 vertualenv
pandas: 0.23.4
numpy: 1.15.0
Failed in this test:
xgboost/tests/python/test_with_pandas.py
Line 125 in 4912c1f
assert cv.columns.equals(exp) |
The actual result has 'train-' sorted before 'test-'.
I tried to go into training code and found this:
xgboost/python-package/xgboost/training.py
Line 300 in 4912c1f
for k, v in sorted(cvmap.items(), key=lambda x: (x[0].startswith('test'), x[0])): |
If x.startswith('test')
is True
, it will have greater value than False
, sorted
is meant to sort stuff in ascending order so key starts with "test" will be sorted after key starts with "train", which is the opposite of expected result.
It's not quite clear to me what these code do, so I could be way wrong. And I don't know why Travis didn't fail, I cleaned my virtualenv to ensure nothing else gets in the way.
Any insight? :)