-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Packages breaking if useNames = FALSE becomes the new default #226
Comments
Revdep resultsFour packages break when switching to CRAN:
Bioconductor:
Importantly, I have not run recursive revdep checks on the above Bioconductor package, so more things might break there, when those packages are update too. EDIT 2022-11-18: Dropped packages Pigengene and SCFA, which both were false positives here. |
These should be okay to change in the BioC MatrixGenerics/sparseMatrixStats/DelayedMatrixStats stack because we try to mimic the matrixStats API as closely as possible. |
Thanks. Regarding ETA: matrixStats 0.63.0 first needs to be on CRAN, then I'll make this move. FWIW, matrixStats 0.63.0 is currently in the CRAN incoming queue (unusually long this week), but I hope it's rolling out with 3-5 days. Then, I need to get GenEst to update their package on CRAN too, before I can submit the So, I think it'll be 3-4 weeks before you see the |
@PeteHaitch, I'm just updated the develop branch to use remotes::install_github("HenrikBengtsson/matrixStats", ref = "develop") BTW, I also deprecated PS. matrixStats 0.63.0 is now on CRAN, but that was just a minor release (NEWS), which shouldn't affect you at all. |
Hi Henrik, Just following our twitter thread: https://twitter.com/henrikbengtsson/status/1593674832448614400?s=20&t=i3VT8eg5IYydevMC8gFfww In spectrometry one typically can have a matrix with one spectra per row. The "mean spectra" is computed with colMeans(). Even if I have used R for more than a decade, I still doubt if I've seen hidden bugs due to confusing I understand the performance impact of keeping track of names everywhere and I understand the goals of matrixStats. I'd say getting good performance comes after getting the right calculations, and it's easier to get things right first and then ignore names to make it faster, than get things fast but wrong and not having names to figure out why. Knowing your HPC work, I fully understand that performance is a priority to you and to this package. I wish R was faster in keeping track of names so both goals would not conflict. So I will keep telling everyone to Thanks for all the discussion and explanation, Sergio |
…packages breaking [#226] [ci skip]
@HenrikBengtsson I'm a bit confused between #226 and #227. Do you have an ETA for when you'd like to make that release? |
Yeah, you're in the rights to be confused. I created Issue #227 ( What would be really useful is to have some serious benchmarking arguments from both sides, e.g. library(matrixStats)
Xs <- lapply(1:10000, FUN = function(ii) {
X <- matrix(rnorm(n = 16L), nrow = 4L, ncol = 4L)
rownames(X) <- sample(letters, size = 4L)
colnames(X) <- sample(LETTERS, size = 4L)
X
})
stats <- bench::mark(lapply(Xs, FUN = rowSums2, useNames = FALSE), lapply(Xs, FUN = rowSums2, useNames = TRUE), check = FALSE, min_iterations = 100L)
print(stats)
## # A tibble: 2 × 13
## expression min median `itr/sec` mem_alloc `gc/sec` n_itr n_gc total_time ## result memory time gc
## <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl> <int> <dbl> <bch:tm> <list> <list> <list> <list>
## 1 lapply(Xs, FUN = rowSums2, useNames = FALSE) 32.9ms 34.2ms 28.8 78.2KB 25.5 53 47 1.84s <NULL> <Rprofmem [26 × 3]> <bench_tm [100]> <tibble>
## 2 lapply(Xs, FUN = rowSums2, useNames = TRUE) 35.9ms 39.2ms 23.6 78.2KB 25.6 48 52 2.03s <NULL> <Rprofmem [102 × 3]> <bench_tm [100]> <tibble> The more such use cases, the better. This would provide things to discuss.
I won't make any move on this before the end of January at the earliest. It would be good to settle on this in good time before the next Bioconductor release. But importantly, make sure to enjoy your break and don't worry about this. |
Thanks, Henrik, I hope you have an enjoyable break over the Christmas and New Year. |
This addresses HenrikBengtsson/matrixStats#226 The change is a simple search and replace.
This addresses HenrikBengtsson/matrixStats#226 The change is a simple search and replace.
Hey, I created a new branch in So if you decide to go ahead with the change, we can just merge the branch to avoid disruption to the end users :) |
Closing. See Issue #232 . |
I'm going to make a decision on what the default for
useNames
will be. Based on the newly added Design Goals:I'll make the new default
useNames = FALSE
.Actions
useNames = FALSE
the default everywhereuseNames = NA
useNames = FALSE
on all 420+ CRAN and Bioconductor packages to identify which packages breaks and if so, which functions are involveduseNames = TRUE
, where neededThe text was updated successfully, but these errors were encountered: