CatBoost on GPU provides much worse performance than on CPU

Viewed 825

We are testing CatBoost on both CPU and GPU. While it runs much faster on GPU than on CPU, the results we are getting are so much worse and we are using the same data.

I am talking around 50% worse.

How is this possible?

We are using the following code to run it on CPU and only changing the task_type to GPU when running on GPU:

catBoostModel = CatBoostClassifier(
    task_type="CPU",
    early_stopping_rounds=50,
    eval_metric="Precision",
    cat_features=["Symbol"], 
    auto_class_weights="Balanced",
    thread_count=-1
)

What are we missing?

1 Answers

There are some hyperparameters for which CatBoost uses different default values on CPU and GPU. There are also some hyperparameters that are only available on GPU or only available on CPU. The CatBoost documentation provides all the details.

This means that even if you are running the same code both on CPU and on GPU, you are likely training two different models. You can use model.get_all_params() (where model is your trained model object) to get the list of all hyperparameters and compare between CPU and GPU.

Related