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

robyn_chain function not found error #959

Open shuvayan opened 2 months ago

shuvayan commented 2 months ago

Project Robyn

Describe issue

Describe your issue and provide warnings and error messages. The function robyn_refresh utilizes robyn_chain internally , which seems to have been deprecated/removed in the latest version.

Below is the error message :

Error in robyn_chain(json_file) : could not find function "robyn_chain"

Provide reproducible example

Issues are often related to custom input data that is difficult to debug without. If necessary, please modify your data to mask real values and share a dataset that is able to reproduce the issue. Please also share your model configuration and exported JSON files if available.

Environment & Robyn version

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

All the packages are being run as the latest version in Windows.

Can someone help me with this or point me towards the resolution

shuvayan commented 2 months ago

Screenshot 2024-04-24 202624

gufengzhou commented 2 months ago

The function is not deprecated. You can see it here. Please check if you're using the latest GitHub version and retry.

shuvayan commented 2 months ago

My apologies, it was because of the latest version not being used. However, now it says the json file is not found :

image

I think it is because the function robyn_chain is not being able to locate the file correctly, because file <- paste0("RobynModel-", json_new$InputCollect$refreshSourceID, ".json") returns NULL. The InputCollect object doesn't have a refreshSourceID in my case, is that because I am doing something incorrectly or has something changed in the library? Splitting hairs!!

BTW, thanks for the awesome library!!

gufengzhou commented 2 months ago

hm this is strange. I just tried refresh on the demo data and can't reproduce your error. In your screenshot, the model recreation is successful using the json. So it's strange that it misses the second time. Let's see if Bernardo's fix on your other issue can solve this first?