Skip to content

Commit be66d28

Browse files
author
Chen Ying
authored
Merge pull request #526 from GoekeLab/fix_xgboost_parallel_issue_for_v4
Fix xgboost parallel issue for v4
2 parents b75e95d + d95f0b0 commit be66d28

3 files changed

Lines changed: 2 additions & 4 deletions

File tree

R/bambu.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ bambu <- function(reads, annotations = NULL, genome = NULL, NDR = NULL,
181181

182182
emParameters <- setEmParameters(emParameters = opt.em)
183183
bpParameters <- setBiocParallelParameters(reads, ncore, verbose, demultiplexed)
184+
xgb.set.config(nthread = 1)
184185
# only when reads is not NULL, this proceed, otherwise, it will jump to quant step
185186
if(!is.null(reads)){
186187
rm.readClassSe <- FALSE

R/bambu_utilityFunctions.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
#' @importFrom BiocParallel bpparam
55
#' @noRd
66
setBiocParallelParameters <- function(reads, ncore, verbose, demultiplexed){
7-
if(ncore >= 2) message("WARNING - If you change the number of cores (ncore) ",
8-
"between Bambu runs and there is no progress please restart your R session ",
9-
"to resolve the issue that originates from the XGboost package.")
107
bpParameters <- bpparam()
118
#===# set parallel options: otherwise use parallel to distribute samples
129
# when demultiplexed is FALSE, isFALSE(demultiplexed) is TRUE

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ Minor changes:
695695
- Resolve process.y.margin.and.object error [issue](https://github.com/GoekeLab/bambu/issues/505)
696696
- Resolve xgboost warnings related to argument updates in the recent xgboost version
697697
- Resolve the dplyr warning related to summarise usage [issue](https://github.com/GoekeLab/bambu/issues/380)
698-
698+
- Resolve the xgboost related parallel processing restarting with no progress issue
699699

700700
**bambu v3.8.2**
701701

0 commit comments

Comments
 (0)