mixOmicsTeam / mixOmics

Development repository for the Bioconductor package 'mixOmics '
http://mixomics.org/
162 stars 54 forks source link

Issue 216 - BPPARAM in `tune` and `perf` functions #333

Closed evaham1 closed 3 weeks ago

evaham1 commented 1 month ago

Updating the parallel running of tune() functions to use the BPPARAM arg

tune.spca() - was already parallelised using BPPARAM when run independently, but this wasn't working in the tune wrapper so made sure BPPARAM is passed through wrapper to function ✅ tune.spls() - was already parallelised using BPPARAM but did not pass this on to tune.spls1 when this was called, now fixed ✅ tune.splsda() - was parallelised using old-tyle cpu and parallel arguments. Updated this to BPPARAM which feeds into internal function MCVfold.spls(). perf() also makes use of this internal function so updated it to reflect the fact the MCVfold.spls() takes BPPARAM arg now instead of cpu. ✅ tune.block.splsda() - was already parallelised using BPPARAM but was not in tune wrapper function so added to wrapper and added testing ✅ tune.spls.level() - added parallelisation using BPPARAM independently and through tune() wrapper

✅ Added unit testing for all the tune functions above to make sure they:

evaham1 commented 1 month ago

Updating perf() functions to use BPPARAM

As MCVfold.spls() is also used by perf(), which is a generic function that acts as a dispatcher for following functions depending on the class of the input object: perf.mixo_pls() perf.mixo_spls() perf.mixo_plsda() perf.mixo_splsda() perf.sgccda() perf.mint.plsda() perf.mint.splsda()

✅ Updated these functions to make sure they all use BPPARAM and pass this to bplapply rather than lapply ✅ Added tests for these functions running in serial and parallel and with and without progress bar.