anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: gpflow/gpflow
Issue: compute_log_likelihood for SVGP class results in unitialized variable error. 

The following code gives an error.

```
import numpy as np
import GPflow

rng = np.random.RandomState(1)
X = rng.randn( 10, 1)
Y = rng.randn( 10, 1 ) 
Z = rng.randn( 3,1 )
model = GPflow.svgp.SVGP( X=X, Y=Y, kern=GPflow.kernels.RBF(1) ,likelihood=GPflow.likelihoods.Gaussian() , Z=Z )
model.compute_log_likelihood()
```

> FailedPreconditionError: Attempting to use uninitialized value tfY

It seems this may be down to recent changes? 


Changed files:
GPflow/param.py, testing/test_autoflow.py

diff --git a/GPflow/param.py b/GPflow/param.py
index 3d08a950..2ddac206 100644
--- a/GPflow/param.py
+++ b/GPflow/param.py
@@ -297,6 +297,7 @@ class AutoFlow:
                 with instance.tf_mode():
                     storage['tf_result'] = tf_method(instance, *storage['tf_args'])
                 storage['session'] = tf.Session()
+                storage['session'].run(tf.initialize_all_variables())
             feed_dict = dict(zip(storage['tf_args'], np_args))
             feed_dict[storage['free_vars']] = instance.get_free_state()
             return storage['session'].run(storage['tf_result'], feed_dict=feed_dict)
diff --git a/testing/test_autoflow.py b/testing/test_autoflow.py
index 0b9ad4a3..748e7f68 100644
--- a/testing/test_autoflow.py
+++ b/testing/test_autoflow.py
@@ -88,7 +88,7 @@ class TestGPmodel(unittest.TestCase):
         mu, var = self.m.predict_y(self.Xtest)
 
     def test_predict_density(self):
-        d = self.m.predict_density(self.Xtest, self.Ytest)
+        self.m.predict_density(self.Xtest, self.Ytest)
 
 
 class TestResetGraph(unittest.TestCase):
@@ -127,5 +127,18 @@ class TestFixAndPredict(unittest.TestCase):
         _, _ = self.m.predict_f(self.m.X)
 
 
+class TestSVGP(unittest.TestCase):
+    """
+    This replicates Alex's code from bug #99
+    """
+    def test(self):
+        rng = np.random.RandomState(1)
+        X = rng.randn(10, 1)
+        Y = rng.randn(10, 1)
+        Z = rng.randn(3, 1)
+        model = GPflow.svgp.SVGP(X=X, Y=Y, kern=GPflow.kernels.RBF(1), likelihood=GPflow.likelihoods.Gaussian(), Z=Z)
+        model.compute_log_likelihood()
+
+
 if __name__ == "__main__":
     unittest.main()