Does anyone have an idea why doParallel::registerDoParallel function messes up grid search (tune::tune_grid) with lightGBM engine? The error message is: All models failed. Run show_notes(.Last.tune.result) for more information.
I am using treesnip and registering threads as per documentation .
What other option do I have to run grid search in parallel?
The tidymodels team and treesnip authors have shifted our development to a new parsnip extension package for tree-based models called bonsai, which also supports the LightGBM engine. Switching to that package should do the trick.
If parallelization wiith bonsai ends up giving you trouble, please post a reprex demonstrating your problem and I'll look into this further!
switching to bonsai package solved the issue. Thanks Simon!
On unrelated note: when using bonsai, the tune::tune_grid stopped outputting progress info, all things being the same tune::control_grid(verbose = TRUE). Is this an expected behavior? An older SO answer by Julia mentioned that this is the result of parallel processing (at least I know I am using it now, lol). Is this still a thing?
This is indeed still a thing—logging is much trickier for us when parallelization is involved. From tune::control_grid docs:
verbose A logical for logging results (other than warnings and errors, which are always shown) as they are generated during training in a single R process. When using most parallel backends, this argument typically will not result in any logging.