Invalid classes inferred from unique values of `y`. Expected: [ 0 1 2 ... 1387 1388 1389], got [ 0 1 2 ... 18609 24127 41850]

I have met this value error when using xgbclassifier and have no clue to solve this, would you please help me to look into it?
Here is my question posted on StackOverflow: https://stackoverflow.com/questions/72452872/valueerror-invalid-classes-inferred-from-unique-values-of-y-expected-0-1-2

Thank you!