fairseq/data/shorten_dataset.py

Killed 0 out of 2 mutants

Survived

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

Mutant 433

--- fairseq/data/shorten_dataset.py
+++ fairseq/data/shorten_dataset.py
@@ -26,7 +26,6 @@
             item = item[:self.truncation_length]
         return item
 
-    @property
     def sizes(self):
         return np.minimum(self.dataset.sizes, self.truncation_length)
 

Mutant 434

--- fairseq/data/shorten_dataset.py
+++ fairseq/data/shorten_dataset.py
@@ -38,7 +38,7 @@
     """Truncate a sequence by returning a random crop of truncation_length tokens
     """
 
-    def __init__(self, dataset, truncation_length, seed=1):
+    def __init__(self, dataset, truncation_length, seed=2):
         super().__init__(dataset, truncation_length)
         self.seed = seed
         self.epoch = 0