* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/scaffolder.Rcheck’ * using R Under development (unstable) (2024-03-16 r86144) * using platform: x86_64-pc-linux-gnu * R was compiled by gcc (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) GNU Fortran (GCC) 13.2.1 20231011 (Red Hat 13.2.1-4) * running under: Fedora Linux 38 (Workstation Edition) * using session charset: UTF-8 * checking for file ‘scaffolder/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘scaffolder’ version ‘0.0.1’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘scaffolder’ can be installed ... OK * checking package directory ... OK * checking ‘build’ directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking whether startup messages can be suppressed ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [11s/11s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking LazyData ... NOTE 'LazyData' is specified without a 'data' directory * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking examples with --run-donttest ... ERROR Running examples in ‘scaffolder-Ex.R’ failed The error most likely occurred in: > ### Name: custom_scaffold_py_function_wrapper > ### Title: Custom Scaffolding of R Wrappers for Python Functions > ### Aliases: custom_scaffold_py_function_wrapper > > ### ** Examples > > ## No test: > > library(tensorflow) > library(stringr) > > # Example of a `process_param_fn` to cast parameters with default values > # that contains "L" to integers > process_int_param_fn <- function(param, docs) { + # Extract the list of parameters that have integer values as default + int_params <- gsub( + " = [-]?[0-9]+L", + "", + str_extract_all(docs$signature, "[A-z]+ = [-]?[0-9]+L")[[1]]) + # Explicitly cast parameter in the list obtained above to integer + if (param %in% int_params) { + param <- paste0("as.integer(", param, ")") + } + param + } > > # Note that since the default value of parameter `k` is `1L`. It is wrapped > # by `as.integer()` to ensure it's casted to integer before sending it to `tf$nn$top_k` > # for execution. We then print out the python function result. > custom_scaffold_py_function_wrapper( + "tf$nn$top_k", + r_function = "top_k", + process_param_fn = process_int_param_fn, + postprocess_fn = function() { "print(python_function_result)" }) Error: Valid installation of TensorFlow not found. Python environments searched for 'tensorflow' package: /usr/bin/python3.11 /usr/bin/python3.11 Python exception encountered: Traceback (most recent call last): File "/data/blackswan/ripley/R/R-devel/site-library/reticulate/python/rpytools/loader.py", line 119, in _find_and_load_hook return _run_hook(name, _hook) ^^^^^^^^^^^^^^^^^^^^^^ File "/data/blackswan/ripley/R/R-devel/site-library/reticulate/python/rpytools/loader.py", line 93, in _run_hook module = hook() ^^^^^^ File "/data/blackswan/ripley/R/R-devel/site-library/reticulate/python/rpytools/loader.py", line 117, in _hook return _find_and_load(name, import_) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ModuleNotFoundError: No module named 'tensorflow' You can install TensorFlow using the install_tensorflow() function. Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [11s/11s] OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/blackswan/ripley/R/packages/tests-devel/scaffolder.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 1:37.91, 85.14 + 11.98