pyro/infer/rws.py

Killed 1 out of 7 mutants

Survived

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

Mutant 229

--- pyro/infer/rws.py
+++ pyro/infer/rws.py
@@ -75,7 +75,7 @@
     """
 
     def __init__(self,
-                 num_particles=2,
+                 num_particles=3,
                  insomnia=1.,
                  model_has_params=True,
                  num_sleep_particles=None,

Mutant 230

--- pyro/infer/rws.py
+++ pyro/infer/rws.py
@@ -76,7 +76,7 @@
 
     def __init__(self,
                  num_particles=2,
-                 insomnia=1.,
+                 insomnia=2.0,
                  model_has_params=True,
                  num_sleep_particles=None,
                  vectorize_particles=True,

Mutant 231

--- pyro/infer/rws.py
+++ pyro/infer/rws.py
@@ -77,7 +77,7 @@
     def __init__(self,
                  num_particles=2,
                  insomnia=1.,
-                 model_has_params=True,
+                 model_has_params=False,
                  num_sleep_particles=None,
                  vectorize_particles=True,
                  max_plate_nesting=float('inf'),

Mutant 232

--- pyro/infer/rws.py
+++ pyro/infer/rws.py
@@ -79,7 +79,7 @@
                  insomnia=1.,
                  model_has_params=True,
                  num_sleep_particles=None,
-                 vectorize_particles=True,
+                 vectorize_particles=False,
                  max_plate_nesting=float('inf'),
                  strict_enumeration_warning=True):
         # force K > 1 otherwise SNIS not possible

Mutant 234

--- pyro/infer/rws.py
+++ pyro/infer/rws.py
@@ -81,7 +81,7 @@
                  num_sleep_particles=None,
                  vectorize_particles=True,
                  max_plate_nesting=float('inf'),
-                 strict_enumeration_warning=True):
+                 strict_enumeration_warning=False):
         # force K > 1 otherwise SNIS not possible
         assert(num_particles > 1), \
             "Reweighted Wake Sleep needs to be run with more than one particle"

Mutant 235

--- pyro/infer/rws.py
+++ pyro/infer/rws.py
@@ -228,7 +228,6 @@
 
         return wrapped_fn
 
-    @staticmethod
     def _get_matched_trace(model_trace, guide, args, kwargs):
         kwargs["observations"] = {}
         for node in model_trace.stochastic_nodes + model_trace.observation_nodes: