Comments (7)
Hi @FlavioZanette ,
I just checked here the latest released version of TFP and regularize_series
is still defined. There were no backwards incompatible changes.
What version of TFP and tfcausalimpact do you have installed on your machine? If you run pip install -U tfcausalimpact
does it work?
from tfcausalimpact.
I restarted my cluster and ran again, checked the versions:
tensorflow==2.10.0
tensorflow-probability==0.14.0
tfcausalimpact==0.0.11
Now, this is the error message:
"WARNING:tensorflow:From /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow/python/autograph/impl/api.py:458: StructuralTimeSeries.joint_log_prob (from tensorflow_probability.python.sts.structural_time_series) is deprecated and will be removed after 2022-03-01.
Instructions for updating:
Please use StructuralTimeSeries.joint_distribution(observed_time_series).log_prob
WARNING:tensorflow:From /local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/distributions/distribution.py:345: calling MultivariateNormalDiag.init (from tensorflow_probability.python.distributions.mvn_diag) with scale_identity_multiplier is deprecated and will be removed after 2020-01-01.
Instructions for updating:
scale_identity_multiplier
is deprecated; please combine it into scale_diag
directly instead.
TypeError: in user code:
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/causalimpact/model.py", line 368, in _run_vi *
tfp.vi.fit_surrogate_posterior(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/vi/optimization.py", line 301, in fit_surrogate_posterior **
return tfp_math.minimize(complete_variational_loss_fn,
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/math/minimize.py", line 346, in minimize
initial_loss, initial_grads, initial_parameters = optimizer_step_fn(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/math/minimize.py", line 86, in optimizer_step
loss = loss_fn()
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/vi/optimization.py", line 295, in complete_variational_loss_fn
return variational_loss_fn(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/vi/csiszar_divergence.py", line 969, in monte_carlo_variational_loss
return monte_carlo.expectation(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/monte_carlo/expectation.py", line 166, in expectation
return tf.reduce_mean(f(samples), axis=axis, keepdims=keepdims)
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/vi/csiszar_divergence.py", line 954, in divergence_fn
target_log_prob = nest_util.call_fn(target_log_prob_fn, q_samples)
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/internal/nest_util.py", line 286, in call_fn
return fn(**args)
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/sts/structural_time_series.py", line 501, in log_joint_fn
lgssm = self.make_state_space_model(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/sts/structural_time_series.py", line 240, in make_state_space_model
return self._make_state_space_model(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/sts/components/sum.py", line 548, in _make_state_space_model
component_ssms = self.make_component_state_space_models(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/sts/components/sum.py", line 530, in make_component_state_space_models
component.make_state_space_model(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/sts/structural_time_series.py", line 240, in make_state_space_model
return self._make_state_space_model(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/sts/components/regression.py", line 508, in _make_state_space_model
predicted_timeseries = distribution_util.move_dimension(
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/internal/distribution_util.py", line 427, in move_dimension
return ps.cond(ps.equal(source_idx, dest_idx), lambda: x, x_permuted)
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/internal/prefer_static.py", line 252, in cond
pred_value = _get_static_predicate(pred)
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/internal/prefer_static.py", line 126, in _get_static_predicate
pred_value = _get_static_value(pred)
File "/local_disk0/.ephemeral_nfs/cluster_libraries/python/lib/python3.9/site-packages/tensorflow_probability/python/internal/prefer_static.py", line 117, in _get_static_value
pred_value = c_api.TF_TryEvaluateConstant_wrapper(pred.graph._c_graph,
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: ,
"
from tfcausalimpact.
The error became even worse! Unfortunately it's outside of the causal package and I have no idea of what might be going on. It does seem to be something related to how tf was compiled on the cluster but it's just a wild guess.
Just wondering, does your script runs normally on another environment other than your cluster? This might indicate if it's something related to the cluster settings.
from tfcausalimpact.
I'm also seeing the same error TF_TryEvaluateConstant_wrapper(): incompatible function arguments.
on a code that was previously running.
Is this a question to tensorflow?
from tfcausalimpact.
downgrading to tensorflow 2.9.2 fixed this issue for me
from tfcausalimpact.
Thanks @nicholas-miles-brex for the input. @FlavioZanette , does nicolas suggestion solves your issue?
I've been trying to replicate this error on my side but to no avail so far, it still seems to be something related to environment.
from tfcausalimpact.
For me I was able to resolve the error by installing the tensorflow-probability==0.18.0 version.
I still haven't been able to identify the cause, but for now, everything continues to work normally.
from tfcausalimpact.
Related Issues (20)
- ResourceExhaustedError HOT 1
- How to save the results HOT 2
- Support Python 3.11
- AttributeError: 'NoneType' object has no attribute 'loc' HOT 3
- how to specify which column is y HOT 2
- Question: Is it possible to extract inclusion probabilities of predictors from trained model? HOT 1
- Warnings: deprecated tensorflow features HOT 1
- Question: how to access the P-value as a variable from the model HOT 1
- ValueError: Argument `name` must be a string and cannot contain character `/`. Received: name=build_factored_surrogate_posterior/loc_0_momentum HOT 5
- value erro r HOT 2
- Question about output extraction HOT 2
- find the respont and point.pred HOT 2
- How to set seed within the sampling process? HOT 1
- Difference to find beta
- extract some output from summary HOT 1
- extracting absolute affect and relative effect.
- Probability of a causal impact:
- output of HMC and VI, HOT 7
- modifying alpha. HOT 3
- Process no longer completes HOT 12
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 tfcausalimpact.