-
Notifications
You must be signed in to change notification settings - Fork 56
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
CRAN errors with RcppArmadillo 14.0.0-1 and both 'R-oldrel-macOS' flavors #447
Comments
@coatless While you may be vacationing, a quick low-tech question: Do you still have, or can construct, oldrel-macos ? I am not quite sure how to go about reproducing this aside from bugging^Hkindly asking friendly folks like you 😀 |
@eddelbuettel I'll be back tomorrow to poke at it. I think it's possible to recreate ARM by using Another quick trick: https://github.com/mxschmitt/action-tmate (The other excellent approach by the fastai folks seems to be TKO'd: https://github.com/fastai/fastmac/) |
The failing line on R 4.3.3 arm64 is:
causing: Error in as.integer(as_r_value(x$indices)) :
cannot coerce type 'environment' to vector of type 'integer' Though, this looks to be affected by all
Error in as.integer(as_r_value(x$row)) :
cannot coerce type 'environment' to vector of type 'integer'
Error in as.integer(as_r_value(x$indices)) :
cannot coerce type 'environment' to vector of type 'integer' I think this might be related to the underlying numpy v2.0.0 change. So, maybe this is an upstream My reticulate environment has:
The names on the names(mat)
[1] "all" "any" "argmax" "argmin" "argpartition" "argsort"
[7] "astype" "base" "byteswap" "choose" "clip" "compress"
[13] "conj" "conjugate" "copy" "ctypes" "cumprod" "cumsum"
[19] "data" "device" "diagonal" "dot" "dtype" "dump"
[25] "dumps" "fill" "flags" "flat" "flatten" "getfield"
[31] "imag" "item" "itemset" "itemsize" "max" "mean"
[37] "min" "mT" "nbytes" "ndim" "newbyteorder" "nonzero"
[43] "partition" "prod" "ptp" "put" "ravel" "real"
[49] "repeat" "reshape" "resize" "round" "searchsorted" "setfield"
[55] "setflags" "shape" "size" "sort" "squeeze" "std"
[61] "strides" "sum" "swapaxes" "T" "take" "to_device"
[67] "tobytes" "tofile" "tolist" "tostring" "trace" "transpose"
[73] "var" "view" Relevant |
@t-kalinowski any thoughts on why the |
Hmm, I can't reproduce the error locally. @coatless, were you able to reproduce the error? Any MRE you can share? Do we know what Python reticulate is discovering on the macOS CRAN machine? |
Yep, after @coatless made that connection I also started to wonder if the CRAN machine(s) are simple 'out'? This is a very bizarre, and very one-off issue on what is fairly old and stable code (to check on sparse matrices via scipy). We only see it here and it is clearly confined to |
It seems like reticulate also just started failing CRAN checks for oldrel macos. https://cran.rstudio.org/web/checks/check_results_reticulate.html I'm thinking it is a spurious CRAN issue until I hear otherwise or I can reproduce the error locally. Hopefully will be resolved soon. Might be worth an email to CRAN, just to confirm our understanding. |
Good thinking, should have checked there myself. Concur that 'sit and wait' seems like the right move. And thanks for the added adult oversight here, appreciate it. |
@eddelbuettel @t-kalinowski I don't think it's a one-off issue as I was able to reproduce it locally on a fresh install. I know NumPy v2 just went live and there have been some issues with the underlying library changes. StepsEnvironment setup# Setup rig
brew tap r-lib/rig
brew install --cask rig
# Install oldrel
rig add oldrel
# Set the default version (or use the menu)
rig default oldrel Verify with: R --version RcppArmadillo# Clone repo
gh repo clone RcppCore/RcppArmadillo
# Switch into repo
cd RcppArmadillo ROpen R in the RcppArmadillo folder: R Run: # Install reticulate
install.packages("reticulate")
# Load reticulate
library(reticulate)
# Install scipy (and subsequently `numpy`)
reticulate::py_install("scipy")
# View package list of environment
reticulate::py_list_packages()
# Run tiny test
tinytest::run_test_dir() Test codeif (! py_module_available("scipy")) exit_file("Module scipy missing")
np <- import("numpy")
mat <- np$array(list(list(1, 0, 4), list(0, 0, 5), list(2, 3, 6)))
sp <- import("scipy.sparse")
csc <- sp$csc_matrix(mat)
# Error in as.integer(as_r_value(x$indices)) :
# cannot coerce type 'environment' to vector of type 'integer' |
Thanks, I could reproduce. It seems that |
@t-kalinowski using 1.38.0 compiled from source works nicely! Odd that the 1.37.0 binary being served by CRAN is bad. |
Paging @s-u then for CRAN macOS maintenance: we have seen |
Paging @s-u again: Any chance you could update |
@eddelbuettel Sorry, but 1.38 does fail its checks: https://www.r-project.org/nosvn/R.check/r-oldrel-macos-arm64/reticulate-00check.html |
Hi @s-u and thanks for reporting back. If you read a few of the comments above yours here you will see that a) the |
It seems that the macOS CRAN machine is attempting to evaluate vignette chunks even though the knitr option This only happens on the macOS runners: The relevant lines from the current r-oldrel-macos-arm64 reticulate check output:
The first two lines in the check output, > knitr::opts_chunk$set(eval = FALSE)
> difflib <- import("difflib") I believe are from: The second line should not be being evaluated. (Last commit to that vignette was almost 1 year ago). |
Well, don't ask me - it has nothing to do with the build machine, you can replicate it anywhere with R 4.3.3. It could well be a regression in latest |
I can confirm that this is easy to reproduce - all you need in the |
Thanks for checking, @s-u. It's appreciated. |
Maybe the macOS runner is attempting to There is an active thread on knitr where multiple other packages have recently started failing on macOS-oldrel in a similar way. yihui/knitr#2338 There is also an old thread from a few years ago where a similar failure was observed, but it didn't persist long-enough to require a proper fix. yihui/knitr#2103 I can now reproduce the
|
Thanks to everybody who helped, this has in fact sorted itself out and is no longer an issue. |
See https://cloud.r-project.org/web/checks/check_results_RcppArmadillo.html which currently shows failures on both 'R-oldrel-macos' for both x86_64 and arm64.
The text was updated successfully, but these errors were encountered: