Unverified Commit a9d091d0 authored by moto's avatar moto Committed by GitHub
Browse files

Fbsync: test sanitization and lint fix (#1457)

parent 245da370
...@@ -18,7 +18,9 @@ def _name_func(func, _, params): ...@@ -18,7 +18,9 @@ def _name_func(func, _, params):
strs.append("_".join(str(a) for a in arg)) strs.append("_".join(str(a) for a in arg))
else: else:
strs.append(str(arg)) strs.append(str(arg))
return f'{func.__name__}_{"_".join(strs)}' # sanitize the test name
name = "_".join(strs).replace(".", "_")
return f'{func.__name__}_{name}'
def nested_params(*params_set): def nested_params(*params_set):
......
...@@ -36,7 +36,7 @@ class AutogradTestMixin(TestBaseMixin): ...@@ -36,7 +36,7 @@ class AutogradTestMixin(TestBaseMixin):
): ):
transform = transform.to(dtype=torch.float64, device=self.device) transform = transform.to(dtype=torch.float64, device=self.device)
# gradcheck and gradgradcheck only pass if the input tensors are of dtype `torch.double` or # gradcheck and gradgradcheck only pass if the input tensors are of dtype `torch.double` or
# `torch.cdouble`, when the default eps and tolerance values are used. # `torch.cdouble`, when the default eps and tolerance values are used.
inputs_ = [] inputs_ = []
for i in inputs: for i in inputs:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment