Has anyone encountered CPU throttling issues on a Mac? I am running projpred’s cv_varsel with LOO and after running for maybe 18-24 hours, kernel_task basically shuts down all of my cores to manage the temperature, and everything slows to a halt. Any suggestions would be appreciated!
Hi @lomez,
projpred’s GitHub version supports subsampled LOO (don’t use the subsampled LOO from the current CRAN version 2.8.0: there, subsampled LOO is declared as experimental and we discovered that it is not implemented correctly). Could you perhaps try that?
If you want to obtain more updates on progress when running in parallel, you can check the support for the progressr package in projpred’s GitHub version. As the general package documentation (?`projpred-package`
) says:
[…] This only works if the doFuture backend is used for parallelization, e.g., via
doFuture::registerDoFuture()
andfuture::plan(future::multisession, workers = 4)
. In that case, the progressr package can be used, e.g., by callingprogressr::handlers(global = TRUE)
before running the projection or the CV in parallel. […]
If the Mac has collected dust over time it may be an issue with the fans. If it’s an older Mac it may be worth going to the apple store and asking if they can remove any dust that has accumulated inside of the case.
Also Mac sure your laptop air output vents are not covered while in use.
@fweber144, thank you for the suggestions. I will try both of those.
@stevebronder, I appreciate the ideas. In my case, the computer isn’t very old and appears to be mostly free of dust, so I’m not sure why kernel_task is being so aggressive.
@lomez are you sure you didn’t max out the ram on your machine? It’s easy to do running Stan in parallel and it behaves as you describe
To follow up, I think I found the best workaround. My model had over 200 predictors, which was the main challenge. I realized that there was no good reason to have cv_varsel consider models with 200+ predictors, so I set nterms_max = 50
and the function ran in a reasonable amount of time without invoking kernel_task. Thanks to all for your suggestions.