pyro/infer/importance.py

Killed 0 out of 2 mutants

Survived

Survived mutation testing. These mutants show holes in your test suite.

Mutant 48

--- pyro/infer/importance.py
+++ pyro/infer/importance.py
@@ -64,7 +64,7 @@
         else:
             warnings.warn("The log_weights list is empty, can not compute normalizing constant estimate.")
 
-    def get_normalized_weights(self, log_scale=False):
+    def get_normalized_weights(self, log_scale=True):
         """
         Compute the normalized importance weights.
         """

Mutant 49

--- pyro/infer/importance.py
+++ pyro/infer/importance.py
@@ -147,8 +147,6 @@
         log_weights = log_weights - torch.logsumexp(log_weights)
     return log_weights, model_trace, guide_trace
 
-
-@torch.no_grad()
 def psis_diagnostic(model, guide, *args, **kwargs):
     """
     Computes the Pareto tail index k for a model/guide pair using the technique