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

NumPy 2.0 Incompatibility Issue #998

Closed stdp95 closed 1 week ago

stdp95 commented 1 week ago

Issue

Robyn is currently not compatible with NumPy 2.0. I encountered this issue while trying to run Robyn, and I had to downgrade NumPy to an older version to get it working.

anhdanggit commented 1 week ago

Same problem to me. This is the new code I replaced in install_nevergrad.R to make it work!

conda_create(envname = "r-reticulate", packages = "python=3.9")
use_condaenv("r-reticulate")
conda_install("r-reticulate", "numpy==1.26.4", pip = TRUE)
conda_install("r-reticulate", "nevergrad", pip = TRUE)

To make it more sustainable in env conflicts, probably we could keep the version of python libraries in requirements.txt, and using conda/pip on CLI to install it into the r-reticulate conda env

stdp95 commented 1 week ago

This approach would definitely help to mitigate conflicts in the future.

Additionally, I wanted to share that a fix has been deployed to the main branch of Reticulate. We can pull the latest changes from the main branch or wait until a new version is released. This should resolve the compatibility issue with NumPy 2.0.