Comments (9)
Hello @chsheth !
Looks like a problem with the arviz library. What version of arviz are you currently using and what python version?
from lightweight_mmm.
On the GCP instance, Python is 3.7.8 and arviz is 0.11.2.
from lightweight_mmm.
Hi @pabloduque0 -- not sure if you had any other suggestions but I was getting this error today on colab while running the end_to_end_demo_with_multiple notebook --
ImportError: cannot import name '_png' from 'matplotlib' (/usr/local/lib/python3.7/dist-packages/matplotlib/__init__.py)
Any suggestions? Thanks.
from lightweight_mmm.
Hello @chsheth !
I am unable to reproduce your error on a GCP instance with python 3.7 and the same arviz version.
Could you try pip install --upgrade git+https://github.com/google/lightweight_mmm.git
? Just in case some version got hanged or similar.
As per your other error, if its in colab could you please provide a reproducible colab for me to take a look?
Thanks!
from lightweight_mmm.
Thank you @pabloduque0.
For GCP/arviz, I can email you the notebook, cannot add it here -- I do think it has to do with some versioning.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-9a43dbab01ab> in <module>
1 # Import the relevant modules of the library
----> 2 from lightweight_mmm import lightweight_mmm
3 from lightweight_mmm import optimize_media
4 from lightweight_mmm import plot
5 from lightweight_mmm import preprocessing
/opt/conda/lib/python3.7/site-packages/lightweight_mmm/lightweight_mmm.py in <module>
51 from lightweight_mmm import models
52 from lightweight_mmm import preprocessing
---> 53 from lightweight_mmm import utils
54
55 Prior = Union[
/opt/conda/lib/python3.7/site-packages/lightweight_mmm/utils.py in <module>
22 import jax.numpy as jnp
23 import numpy as np
---> 24 import pandas as pd
25 from scipy import interpolate
26 from scipy import optimize
/opt/conda/lib/python3.7/site-packages/pandas/__init__.py in <module>
140 from pandas.util._print_versions import show_versions
141
--> 142 from pandas.io.api import (
143 # excel
144 ExcelFile,
/opt/conda/lib/python3.7/site-packages/pandas/io/api.py in <module>
6
7 from pandas.io.clipboards import read_clipboard
----> 8 from pandas.io.excel import ExcelFile, ExcelWriter, read_excel
9 from pandas.io.feather_format import read_feather
10 from pandas.io.gbq import read_gbq
/opt/conda/lib/python3.7/site-packages/pandas/io/excel/__init__.py in <module>
----> 1 from pandas.io.excel._base import ExcelFile, ExcelWriter, read_excel
2 from pandas.io.excel._odswriter import _ODSWriter
3 from pandas.io.excel._openpyxl import _OpenpyxlWriter
4 from pandas.io.excel._util import register_writer
5 from pandas.io.excel._xlsxwriter import _XlsxWriter
/opt/conda/lib/python3.7/site-packages/pandas/io/excel/_base.py in <module>
30 get_writer,
31 )
---> 32 from pandas.io.parsers import TextParser
33
34 _read_excel_doc = (
/opt/conda/lib/python3.7/site-packages/pandas/io/parsers/__init__.py in <module>
----> 1 from pandas.io.parsers.readers import (
2 TextFileReader,
3 TextParser,
4 read_csv,
5 read_fwf,
/opt/conda/lib/python3.7/site-packages/pandas/io/parsers/readers.py in <module>
15 import pandas._libs.lib as lib
16 from pandas._libs.parsers import STR_NA_VALUES
---> 17 from pandas._typing import (
18 ArrayLike,
19 DtypeArg,
ImportError: cannot import name 'DtypeArg' from 'pandas._typing' (/opt/conda/lib/python3.7/site-packages/pandas/_typing.py)
For '_png' from 'matplotlib' error, I found on stackoverflow that I would need to downgrade matplotlib version
!python -m pip uninstall matplotlib
!pip install matplotlib==3.1.3
I ran the above before any plot functions and there were no errors.
from lightweight_mmm.
Glad to hear the other error was solved.
Is the arviz error persisting or has that one been solved as well?
In the repro I dont need to see the data or your specific code, you can use mock data for providing the error as the error looks unrelated to your data. You can create a new notebook/colab.
from lightweight_mmm.
Actually I dont know about arviz error, if it got fixed -- the code didnt get to that cell and errored out much earlier. I am running the demo notebooks from here on my GCP instance, so there is nothing that I cannot share...
I was thinking of creating an environment, use requirements from here and then run -- maybe that might make the version issue (if there is one) go away.
from lightweight_mmm.
If you can provide me the basic specifications of your instance I can try to re-create from my side.
from lightweight_mmm.
Here are the details. Thanks for your help @pabloduque0
from lightweight_mmm.
Related Issues (20)
- how to treat zero cost channels and attribution hints HOT 5
- cost and media data is not clear from the documentation HOT 1
- Single-channel use issue HOT 15
- Why Pre and Post Budget Allocation do not change? HOT 6
- Nested modeling HOT 2
- Multivariate input for media data HOT 1
- Response curve questions
- Loading saved model
- Saturation + Carryover transformation HOT 2
- Baseline Contribution Area Plot colours are non-unique HOT 1
- Feature request: Extend to time-varying coefficients (uber's orbit model)
- Question: How to model time dependent features in the fit and predict method? HOT 2
- how to understand the media contribution percentage? HOT 2
- Media contribution percentage sums up to 105% HOT 1
- Have issues with plot.plot_media_channel_posteriors(media_mix_model=mmm) HOT 2
- Budget Allocator - Solution X returns incorrect allocation HOT 1
- limitations in the use of extra features HOT 4
- Anyway to save mmm.print_summary()? HOT 1
- Hierarchical Partially Pooled Media
- media_priors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightweight_mmm.