sklearn's cross_validate does not work with catboost I would like to use cross validation with catboost. Since I do not just want to use catboost but also sampling I am using a pipeline and hence cannot use catboost's own cross validation (which works if I just use catboost and not a pipeline). So I want to use sklearn's cross validation, which works fine if I use just numerical variables but as soon as I also include the categorical variables (cat_features) and use catboost's encoding, cross_validate doesn't work anymore. Even if I don't use a pipeline but just catboost alone I get a KeyError: 0 message with cross_validate. But I don't understand why.
This is part of my code that doesn't work:

from sklearn.model_selection import cross_validate
model = cb.CatBoostClassifier(**params, cat_features=cat_features)
cv_score = cross_validate(model, X_train, y_train, scoring='roc_auc', cv=5, return_train_score=True)
I found out that adding xtrain.astype('O') works.

Apparently catboost doesn't work with pandas Categorical dtypes yet: https://github.com/catboost/catboost/issues/814