WillianFuks / tfcausalimpact

Python Causal Impact Implementation Based on Google's R Package. Built using TensorFlow Probability.
Apache License 2.0
593 stars 70 forks source link

Installation #63

Closed rb-jet closed 1 year ago

rb-jet commented 1 year ago

Hey, this will be a very beginner question, but I've just installed tensorflow and all the accompanying stuff. When I run your example, I get a TypeError. Any idea on what's causing this?

TypeError: TF_TryEvaluateConstant_wrapper(): incompatible function arguments. The following argument types are supported:

  1. (arg0: tensorflow.python.client._pywrap_tf_session.TF_Graph, arg1: tensorflow.python.client._pywrap_tf_session.TF_Output) -> object

Invoked with: <tensorflow.python.framework.c_api_util.ScopedTFGraph object at 0x7fe4b0125d60>, <tensorflow.python.client._pywrap_tf_session.TF_Output object at 0x7fe4845ea130>

WillianFuks commented 1 year ago

Hi @rb-jet ,

Could you please test runnnig pip install tensorflow==2.9.2 to see if it works?

I'm suspecting that latest versions of tf ended up causing some incompatibility with older version of tf probability which this package relies on.

WillianFuks commented 1 year ago

Hi @rb-jet ,

I just released a candidate for fixing this issue, could you please test it to see if it works?

Just run pip install tfcausalimpact==0.0.12rc0 to install the newer version.

Let me know just in case if it works for you.

rb-jet commented 1 year ago

That solved it, thanks for the quick fix!