lightweight_mmm
lightweight_mmm copied to clipboard
INVALID_ARGUMENT: Python buffer protocol is only defined for CPU buffers.
Having this issue while running plot.plot_fit_model() plot.plot_out_of_sample_model_fit()
These both functions are calculating r2_score from arviz.r2_score which is calculating from numba. At some point numba is trying to access memoryview(predictions) which is throwing the error.
predictions type is DeviceArray and the memoryview fails at this point. How do we avoid this?
I didn't get this issue running on colab the library, but let's investigate better the issue.
What versions are you working on? I didn't investigated deeply but these are the versions you should use:
- absl-py
- arviz>=0.11.2
- immutabledict>=2.0.0
- jax>=0.3.18
- jaxlib>=0.3.18
- matplotlib==3.6.1
- numpy==1.23
- numpyro>=0.9.2
- pandas>=1.1.5
- scipy
- seaborn==0.11.1
- scikit-learn
- statsmodels>=0.13.0
- tensorflow>=2.7.2
And there is this compatibility issue explained here (maybe is not related): downgrade numpy requirement temporarily, until numba compatibility wi