fairseq/optim/fused_adam.py
Killed 0 out of 7 mutantsSurvived
Survived mutation testing. These mutants show holes in your test suite.Mutant 858
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -70,7 +70,7 @@
def __init__(self, params,
lr=1e-3, bias_correction=True,
betas=(0.9, 0.999), eps=1e-8, eps_inside_sqrt=False,
- weight_decay=0., max_grad_norm=0., amsgrad=False):
+ weight_decay=1.0, max_grad_norm=0., amsgrad=False):
global fused_adam_cuda
import importlib
fused_adam_cuda = importlib.import_module("fused_adam_cuda")
Mutant 859
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -70,7 +70,7 @@
def __init__(self, params,
lr=1e-3, bias_correction=True,
betas=(0.9, 0.999), eps=1e-8, eps_inside_sqrt=False,
- weight_decay=0., max_grad_norm=0., amsgrad=False):
+ weight_decay=0., max_grad_norm=1.0, amsgrad=False):
global fused_adam_cuda
import importlib
fused_adam_cuda = importlib.import_module("fused_adam_cuda")
Mutant 860
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -70,7 +70,7 @@
def __init__(self, params,
lr=1e-3, bias_correction=True,
betas=(0.9, 0.999), eps=1e-8, eps_inside_sqrt=False,
- weight_decay=0., max_grad_norm=0., amsgrad=False):
+ weight_decay=0., max_grad_norm=0., amsgrad=True):
global fused_adam_cuda
import importlib
fused_adam_cuda = importlib.import_module("fused_adam_cuda")
Mutant 861
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -88,7 +88,6 @@
super().__init__(params, defaults)
self.eps_mode = 0 if eps_inside_sqrt else 1
- @property
def supports_memory_efficient_fp16(self):
return True
Mutant 862
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -92,7 +92,6 @@
def supports_memory_efficient_fp16(self):
return True
- @property
def supports_flat_params(self):
return True
Mutant 863
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -96,7 +96,6 @@
def supports_flat_params(self):
return True
- @property
def supports_step_with_scale(self):
return True
Mutant 864
--- fairseq/optim/fused_adam.py
+++ fairseq/optim/fused_adam.py
@@ -100,7 +100,7 @@
def supports_step_with_scale(self):
return True
- def step(self, closure=None, grads=None, scale=1., grad_norms=None):
+ def step(self, closure=None, grads=None, scale=2.0, grad_norms=None):
"""Performs a single optimization step.
Arguments:
closure (callable, optional): A closure that reevaluates the model