Git Product home page Git Product logo

Comments (9)

pabloduque0 avatar pabloduque0 commented on May 2, 2024

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.

chsheth avatar chsheth commented on May 2, 2024

On the GCP instance, Python is 3.7.8 and arviz is 0.11.2.

from lightweight_mmm.

chsheth avatar chsheth commented on May 2, 2024

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.

pabloduque0 avatar pabloduque0 commented on May 2, 2024

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.

chsheth avatar chsheth commented on May 2, 2024

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.

pabloduque0 avatar pabloduque0 commented on May 2, 2024

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.

chsheth avatar chsheth commented on May 2, 2024

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.

pabloduque0 avatar pabloduque0 commented on May 2, 2024

If you can provide me the basic specifications of your instance I can try to re-create from my side.

from lightweight_mmm.

chsheth avatar chsheth commented on May 2, 2024

Here are the details. Thanks for your help @pabloduque0
instance

from lightweight_mmm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.