fairseq/models/model_utils.py

Killed 0 out of 5 mutants

Survived

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

Mutant 502

--- fairseq/models/model_utils.py
+++ fairseq/models/model_utils.py
@@ -8,8 +8,6 @@
 import torch
 from torch import Tensor
 
-
-@torch.jit.script
 def script_skip_tensor_list(x: List[Tensor], mask):
     res = [xi[mask] if xi.size(0) == mask.size(0) else xi[:, mask] for xi in x]
     outputs = []

Mutant 503

--- fairseq/models/model_utils.py
+++ fairseq/models/model_utils.py
@@ -20,8 +20,6 @@
             outputs.append(x[i])
     return outputs
 
-
-@torch.jit.script
 def script_skip_tensor(x: Tensor, mask):
     # None case
     if x.size(0) == 0:

Mutant 504

--- fairseq/models/model_utils.py
+++ fairseq/models/model_utils.py
@@ -32,8 +32,6 @@
     else:
         return res
 
-
-@torch.jit.script
 def expand_2d_or_3d_tensor(x, trg_dim: int, padding_idx: int):
     """
     Expand 2D/3D tensor on dim=1

Mutant 505

--- fairseq/models/model_utils.py
+++ fairseq/models/model_utils.py
@@ -53,8 +53,6 @@
 
     return x
 
-
-@torch.jit.script
 def coalesce(x: Optional[Tensor], y: Tensor) -> Tensor:
     return x if x is not None else y
 

Mutant 506

--- fairseq/models/model_utils.py
+++ fairseq/models/model_utils.py
@@ -58,8 +58,6 @@
 def coalesce(x: Optional[Tensor], y: Tensor) -> Tensor:
     return x if x is not None else y
 
-
-@torch.jit.script
 def fill_tensors(x: Optional[Tensor], mask, y: Optional[Tensor], padding_idx: int) -> Optional[Tensor]:
     """
     Filling tensor x with y at masked positions (dim=0).