facebookexperimental / Robyn

Robyn is an experimental, AI/ML-powered and open sourced Marketing Mix Modeling (MMM) package from Meta Marketing Science. Our mission is to democratise modeling knowledge, inspire the industry through innovation, reduce human bias in the modeling process & build a strong open source marketing science community.
https://facebookexperimental.github.io/Robyn/
MIT License
1.07k stars 323 forks source link

Getting Error in signif(nevergrad_hp_val[[co]][index], 6) : non-numeric argument to mathematical function while running demo.R script #984

Open sh2chen opened 1 month ago

sh2chen commented 1 month ago

Project Robyn

Describe issue

Getting Error in signif(nevergrad_hp_val[[co]][index], 6) : non-numeric argument to mathematical function while running demo.R script

I see there was already an issue on this https://github.com/facebookexperimental/Robyn/issues/750

Provide reproducible example

The exact code from Demo.R

Environment & Robyn version

Make sure you're using the latest Robyn version before you post an issue.

R version 4.3.3 (2024-02-29) Platform: aarch64-apple-darwin20 (64-bit) Running under: macOS Sonoma 14.1.2

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles tzcode source: internal

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] reticulate_1.37.0 Robyn_3.10.3

loaded via a namespace (and not attached): [1] gtable_0.3.5 shape_1.4.6.1 ggplot2_3.5.1 QuickJSR_1.1.3 inline_0.3.19
[6] lattice_0.22-6 vctrs_0.6.5 tools_4.3.3 generics_0.1.3 stats4_4.3.3
[11] parallel_4.3.3 tibble_3.2.1 fansi_1.0.6 pkgconfig_2.0.3 Matrix_1.6-5
[16] prophet_1.0 ggridges_0.5.6 rngtools_1.5.2 RcppParallel_5.1.7 lifecycle_1.0.4
[21] farver_2.1.2 compiler_4.3.3 stringr_1.5.1 munsell_0.5.1 minpack.lm_1.2-4
[26] codetools_0.2-20 yaml_2.3.8 glmnet_4.1-8 pillar_1.9.0 nloptr_2.0.3
[31] crayon_1.5.2 tidyr_1.3.1 StanHeaders_2.32.8 doRNG_1.8.6 iterators_1.0.14
[36] rpart_4.1.23 foreach_1.5.2 rstan_2.32.6 tidyselect_1.2.1 rvest_1.0.4
[41] zip_2.3.1 digest_0.6.35 stringi_1.8.4 dplyr_1.1.4 purrr_1.0.2
[46] labeling_0.4.3 splines_4.3.3 rprojroot_2.0.4 grid_4.3.3 here_1.0.1
[51] colorspace_2.1-0 cli_3.6.2 magrittr_2.0.3 patchwork_1.2.0 loo_2.7.0
[56] survival_3.6-4 pkgbuild_1.4.4 utf8_1.2.4 withr_3.0.0 lares_5.2.7
[61] scales_1.3.0 lubridate_1.9.3 timechange_0.3.0 extraDistr_1.10.0 httr_1.4.7
[66] matrixStats_1.3.0 rpart.plot_3.1.2 gridExtra_2.3 png_0.1-8 openxlsx_4.2.5.2
[71] doParallel_1.0.17 rlang_1.1.3 Rcpp_1.0.12 glue_1.7.0 xml2_1.3.6
[76] pROC_1.18.5 jsonlite_1.8.8 R6_2.5.1 plyr_1.8.9

py_config() python: /Users/shuang/Library/r-miniconda-arm64/envs/r-reticulate/bin/python libpython: /Users/shuang/Library/r-miniconda-arm64/envs/r-reticulate/lib/libpython3.10.dylib pythonhome: /Users/shuang/Library/r-miniconda-arm64/envs/r-reticulate:/Users/shuang/Library/r-miniconda-arm64/envs/r-reticulate version: 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:51:49) [Clang 16.0.6 ] numpy: [NOT FOUND] nevergrad: [NOT FOUND]

NOTE: Python version was forced by RETICULATE_PYTHON

py_module_available("numpy") [1] TRUE py_module_available("nevergrad") [1] TRUE

gufengzhou commented 3 weeks ago

py_config shows "not found" for both Nevergrad and numpy. This indicates the 2 are not installed in the required virtual env. Please retry option 2 and restart R after installation