-
Notifications
You must be signed in to change notification settings - Fork 366
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
InputCollect$dt_mod is NULL in Robyn version 3.12.0.9002, even with example data #1195
Comments
I can't reproduce your error. There's been a few minor fixes since then. Maybe try the latest again? I noticed that you're not using prophet/trends/holidays etc at all. Is that intensional? |
Can you share me any git that I can keepIt for reference and run that sample code? For some reason, I am keep getting that dt_mod is NULLSent from my iPhoneOn Jan 21, 2025, at 4:44 PM, gufengzhou ***@***.***> wrote:
I can't reproduce your error. There's been a few minor fixes since then. Maybe try the latest again?
I noticed that you're not using prophet/trends/holidays etc at all. Is that intensional?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Ok I see that you're not really running our demo code completely. You didnt append hyperparameters into robyn_inputs. Also I see that you ommited holidays/season/trend completely, is that intentional? But regardless, it should work. Please run the below after loading the package
|
Hi,
Could you please share a sample notebook that I can run on my sample data? I currently have two channels in the dataset, and I plan to add holiday, seasonality, and trend data later.
I would really appreciate it if you could provide sample code for an end-to-end reference.
Thank you,
KrishnaSent from my iPhoneOn Jan 22, 2025, at 7:59 AM, gufengzhou ***@***.***> wrote:
Ok I see that you're not really running our demo code completely. You didnt append hyperparameters into robyn_inputs. Also I see that you ommited holidays/season/trend completely, is that intentional? But regardless, it should work.
Please run the below after loading the package
hyperparameters <- list(
tv_S_alphas = c(0.5, 3),
tv_S_gammas = c(0.3, 1),
tv_S_thetas = c(0, 0.3),
ooh_S_alphas = c(0.5, 3),
ooh_S_gammas = c(0.3, 1),
ooh_S_thetas = c(0, 0.3),
print_S_alphas = c(0.5, 3),
print_S_gammas = c(0.3, 1),
print_S_thetas = c(0, 0.3),
facebook_I_alphas = c(0.5, 3),
facebook_I_gammas = c(0.3, 1),
facebook_I_thetas = c(0, 0.3),
search_clicks_P_alphas = c(0.5, 3),
search_clicks_P_gammas = c(0.3, 1),
search_clicks_P_thetas = c(0, 0.3)
)
InputCollect <- robyn_inputs(
dt_input = dt_simulated_weekly,
date_var = "DATE",
dep_var = "revenue",
dep_var_type = "revenue",
paid_media_spends = c("tv_S", "ooh_S", "print_S", "facebook_S", "search_S"),
paid_media_vars = c("tv_S", "ooh_S", "print_S", "facebook_I", "search_clicks_P"),
context_vars = c("competitor_sales_B"),
adstock = "geometric",
hyperparameters = hyperparameters
)
OutputModels <- robyn_run(
InputCollect = InputCollect,
iterations = 1000,
trials = 1
)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Can you share me complete demo code for me to run end-2-end? |
Project Robyn
Describe issue
I am encountering an issue where InputCollect$dt_mod is NULL when using the robyn_inputs() function, even when running the built-in example code provided by the Robyn package. This issue prevents me from proceeding with the model, as subsequent functions depend on InputCollect$dt_mod being properly populated.
Despite trying various troubleshooting steps, including:
Updating to the latest version of Robyn (3.12.0.9002)
Ensuring all package dependencies are up to date
Running the code in a clean R environment
Verifying that all variable names and data types are correct
Testing with both simulated and example data
The problem persists.
Error message: Error: InputCollect$dt_mod is NULL. There is an issue with the input data.
Provide reproducible example
Below is the code I'm using, which is based on the example from the Robyn documentation:
Load necessary libraries
library(Robyn)
library(dplyr)
Load example data
data("dt_simulated_weekly")
head(dt_simulated_weekly)
Define model inputs
InputCollect <- robyn_inputs(
dt_input = dt_simulated_weekly,
date_var = "DATE",
dep_var = "revenue",
dep_var_type = "revenue",
paid_media_spends = c("tv_S", "ooh_S", "print_S", "facebook_S", "search_S"),
paid_media_vars = c("tv_S", "ooh_S", "print_S", "facebook_I", "search_clicks_P"),
context_vars = c("competitor_sales_B"),
adstock = "geometric"
)
Check if dt_mod is NULL
if (is.null(InputCollect$dt_mod)) {
stop("InputCollect$dt_mod is NULL. There is an issue with the input data.")
} else {
print("InputCollect$dt_mod is properly populated. Proceeding to run the model.")
}
Define hyperparameters
hyperparameters <- list(
tv_S_alphas = c(0.5, 3),
tv_S_gammas = c(0.3, 1),
tv_S_thetas = c(0, 0.3),
ooh_S_alphas = c(0.5, 3),
ooh_S_gammas = c(0.3, 1),
ooh_S_thetas = c(0, 0.3),
print_S_alphas = c(0.5, 3),
print_S_gammas = c(0.3, 1),
print_S_thetas = c(0, 0.3),
facebook_I_alphas = c(0.5, 3),
facebook_I_gammas = c(0.3, 1),
facebook_I_thetas = c(0, 0.3),
search_clicks_P_alphas = c(0.5, 3),
search_clicks_P_gammas = c(0.3, 1),
search_clicks_P_thetas = c(0, 0.3)
)
InputCollect$hyperparameters <- hyperparameters
Attempt to run the model (cannot proceed due to the dt_mod issue)
OutputCollect <- robyn_run(InputCollect, ...)
Note: Since InputCollect$dt_mod is NULL, I cannot proceed to run the model using robyn_run().
Environment & Robyn version
Robyn version: 3.12.0.9002 (from packageVersion("Robyn"))
R version: R version 4.4.2 (2024-10-31) (from R.Version()$version.string)
Operating System: [Please specify your operating system, e.g., Windows 10, macOS Ventura 13.0, Ubuntu 22.04]
Session Information:
'R version 4.4.2 (2024-10-31)'
[1] ‘3.12.0.9002’
[1] ‘1.1.4’
[1] ‘1.16.4’
R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 22.04.3 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
time zone: Etc/UTC
tzcode source: system (glibc)
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplot2_3.5.1 Robyn_3.12.0.9002 dplyr_1.1.4 remotes_2.5.0
[5] devtools_2.4.5 usethis_3.1.0
loaded via a namespace (and not attached):
[1] tidyselect_1.2.1 IRdisplay_1.1 farver_2.1.2 fastmap_1.2.0
[5] pROC_1.18.5 promises_1.3.2 digest_0.6.37 rpart_4.1.23
[9] timechange_0.3.0 mime_0.12 lifecycle_1.0.4 ellipsis_0.3.2
[13] survival_3.8-3 processx_3.8.4 magrittr_2.0.3 compiler_4.4.2
[17] rlang_1.1.4 rngtools_1.5.2 tools_4.4.2 yaml_2.3.10
[21] lares_5.2.10 doRNG_1.8.6 htmlwidgets_1.6.4 pkgbuild_1.4.5
[25] curl_6.0.1 reticulate_1.40.0 plyr_1.8.9 xml2_1.3.6
[29] repr_1.1.7 pkgload_1.4.0 miniUI_0.1.1.1 pbdZMQ_0.3-13
[33] withr_3.0.2 purrr_1.0.2 desc_1.4.3 grid_4.4.2
[37] urlchecker_1.0.1 profvis_0.4.0 xtable_1.8-4 colorspace_2.1-1
[41] scales_1.3.0 iterators_1.0.14 ggridges_0.5.6 cli_3.6.3
[45] crayon_1.5.3 generics_0.1.3 RcppParallel_5.1.9 httr_1.4.7
[49] sessioninfo_1.2.2 cachem_1.1.0 stringr_1.5.1 splines_4.4.2
[53] prophet_1.0 rvest_1.0.4 parallel_4.4.2 base64enc_0.1-3
[57] vctrs_0.6.5 glmnet_4.1-8 Matrix_1.7-1 jsonlite_1.8.9
[61] callr_3.7.6 patchwork_1.3.0 foreach_1.5.2 tidyr_1.3.1
[65] glue_1.8.0 nloptr_2.1.1 codetools_0.2-20 ps_1.8.1
[69] lubridate_1.9.4 stringi_1.8.4 shape_1.4.6.1 gtable_0.3.6
[73] later_1.4.1 rpart.plot_3.1.2 munsell_0.5.1 tibble_3.2.1
[77] pillar_1.10.0 htmltools_0.5.8.1 IRkernel_1.3.2 R6_2.5.1
[81] doParallel_1.0.17 evaluate_1.0.1 shiny_1.10.0 lattice_0.22-6
[85] png_0.1-8 openxlsx_4.2.7.1 memoise_2.0.1 httpuv_1.6.15
[89] Rcpp_1.0.13-1 zip_2.3.1 uuid_1.2-1 fs_1.6.5
[93] pkgconfig_2.0.3
Additional Details
Steps Taken:
Checked that all variables in dt_input are correctly named and match those specified in robyn_inputs().
Ensured that all required packages are installed and loaded.
Ran the code in a fresh R session to eliminate any environment issues.
Verified that the example data (dt_simulated_weekly) is correctly loaded and structured.
Observations:
The issue occurs even with the built-in example data, suggesting it may not be data-specific.
InputCollect is created, but InputCollect$dt_mod remains NULL.
No additional error messages are provided to indicate why dt_mod is NULL.
Request for Assistance
Could you please help me identify why InputCollect$dt_mod is NULL and how to resolve this issue? Any guidance on adjustments needed for Robyn version 3.12.0.9002 would be greatly appreciated.
The text was updated successfully, but these errors were encountered: