Open angelhsu05 opened 1 year ago
For anyone having similar problems there are two solutions that worked for me, both on windows and linux (docker).
When running sequentially it's should be sufficienet to add this to my code:
parsnip::set_dependency("boost_tree", eng = "catboost", pkg = "catboost", mode = "regression")
parsnip::set_dependency("boost_tree", eng = "catboost", pkg = "treesnip", mode = "regression")
However, when I tune the hyperparameters (grid search or a race method) and use parallel processing I still get an error.
This is what worked for me:
cl <- parallel::makeCluster(n_cores)
result <- parallel::clusterEvalQ(cl, {
sink(file=NULL)
library(tidymodels)
library(catboost)
library(treesnip)
sink()
})
doParallel::registerDoParallel(cl)
I'm trying to conduct a grid search per https://www.r-bloggers.com/2020/08/how-to-use-catboost-with-tidymodels/, but when I try, following this example, i'm getting an error where all models fail and it says "train_catboost" is not an exported object from 'namespace:treesnip'