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 322 forks source link

AttributeError: '_DE' object has no attribute 'set_objective_weights' #908

Closed joangcc closed 5 months ago

joangcc commented 5 months ago

Project Robyn

Describe issue

Using demo file, with demo input data, and Robyn version 3.10.5.9010.

When running robyn_run in RStudio, I get this message:

> ## Run all trials and iterations. Use ?robyn_run to check parameter definition
> OutputModels <- robyn_run(
+   InputCollect = InputCollect, # feed in all model specification
+   cores = NULL, # NULL defaults to (max available - 1)
+   iterations = 2000, # 2000 recommended for the dummy dataset with no calibration
+   trials = 5, # 5 recommended for the dummy dataset
+   ts_validation = TRUE, # 3-way-split time series for NRMSE validation.
+   add_penalty_factor = FALSE # Experimental feature. Use with caution.
+ )
Input data has 208 weeks in total: 2015-11-23 to 2019-11-11
Initial model is built on rolling window of 157 week: 2016-01-04 to 2018-12-31
Time-series validation with train_size range of 50%-80% of the data...
Using geometric adstocking with 20 hyperparameters (20 to iterate + 0 fixed) on 1 core (Windows fallback)
>>> Starting 5 trials with 2000 iterations each using TwoPointsDE nevergrad algorithm...
  Running trial 1 of 5
Error in py_get_attr_impl(x, name, silent) : 
  AttributeError: '_DE' object has no attribute 'set_objective_weights'

Environment & Robyn version

Make sure you're using the latest Robyn version before you post an issue. -Reticulate version: 1.26 -Robyn version: 3.10.5.9010 -This is the latest commit I have in my branch. https://github.com/joangcc/Robyn/commit/d30d07eb4bed2d5b9ff87a657de65e4ac17c57ff

gufengzhou commented 5 months ago

This is a new feature in Nevergrad. Just run the one line conda_install Nevergrad and it should work again

https://github.com/facebookexperimental/Robyn/blob/main/demo/install_nevergrad.R

gufengzhou commented 5 months ago

please reopen if necessary