-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python panda test failed. #3622
Comments
Maybe we should re-write the tests so that they won't be flaky. |
It's just I'm not sure that whether the problem is in tests or in the core code, or I misunderstood something important. |
@trivialfis Let me look at this. |
I am also able to reproduce this problem in xgboost
Failure details
I see that the test was comparing
@hcho3 Do you think this is the right fix? |
@ksangeek let me try it later. Weird thing that it runs completely fine with Python 2 so I wasn't sure |
Addressed in #4395 |
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
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
If
x.startswith('test')
isTrue
, it will have greater value thanFalse
,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? :)
The text was updated successfully, but these errors were encountered: