Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9165b27

Browse files
authored
Fixes flake8 --select W605 test warnings (#829)
Signed-off-by: asears <[email protected]>
1 parent e1b7997 commit 9165b27

8 files changed

Lines changed: 10 additions & 7 deletions

File tree

apex/contrib/optimizers/fused_adam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class FusedAdam(torch.optim.Optimizer):
2929
use_mt (boolean, optional): use multi tensor apply for lower launch
3030
latency. (default: False)
3131
32-
.. _Adam\: A Method for Stochastic Optimization:
32+
.. _Adam - A Method for Stochastic Optimization:
3333
https://arxiv.org/abs/1412.6980
3434
.. _On the Convergence of Adam and Beyond:
3535
https://openreview.net/forum?id=ryQu7f-RZ

apex/contrib/optimizers/fused_lamb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class FusedLAMB(torch.optim.Optimizer):
5454
max_grad_norm (float, optional): value used to clip global grad norm
5555
(default: 1.0)
5656
57-
.. _Large Batch Optimization for Deep Learning\: Training BERT in 76 minutes:
57+
.. _Large Batch Optimization for Deep Learning - Training BERT in 76 minutes:
5858
https://arxiv.org/abs/1904.00962
5959
.. _On the Convergence of Adam and Beyond:
6060
https://openreview.net/forum?id=ryQu7f-RZ

apex/optimizers/fused_adam.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class FusedAdam(torch.optim.Optimizer):
5353
set_grad_none (bool, optional): whether set grad to None when zero_grad()
5454
method is called. (default: True)
5555
56-
.. _Adam\: A Method for Stochastic Optimization:
56+
.. _Adam - A Method for Stochastic Optimization:
5757
https://arxiv.org/abs/1412.6980
5858
.. _On the Convergence of Adam and Beyond:
5959
https://openreview.net/forum?id=ryQu7f-RZ

apex/optimizers/fused_lamb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class FusedLAMB(torch.optim.Optimizer):
5252
max_grad_norm (float, optional): value used to clip global grad norm
5353
(default: 1.0)
5454
55-
.. _Large Batch Optimization for Deep Learning\: Training BERT in 76 minutes:
55+
.. _Large Batch Optimization for Deep Learning - Training BERT in 76 minutes:
5656
https://arxiv.org/abs/1904.00962
5757
.. _On the Convergence of Adam and Beyond:
5858
https://openreview.net/forum?id=ryQu7f-RZ

apex/optimizers/fused_novograd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class FusedNovoGrad(torch.optim.Optimizer):
5858
set_grad_none (bool, optional): whether set grad to None when zero_grad()
5959
method is called. (default: True)
6060
61-
.. _Jasper\: An End-to-End Convolutional Neural Acoustic Model:
61+
.. _Jasper - An End-to-End Convolutional Neural Acoustic Model:
6262
https://arxiv.org/abs/1904.03288
6363
.. _On the Convergence of Adam and Beyond:
6464
https://openreview.net/forum?id=ryQu7f-RZ

apex/reparameterization/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from .reparameterization import Reparameterization
33

44
def apply_weight_norm(module, name='', dim=0, hook_child=True):
5-
"""
5+
r"""
66
Applies weight normalization to a parameter in the given module.
77
If no parameter is provided, applies weight normalization to all
88
parameters in model (except 1-d vectors and scalars).

apex/reparameterization/weight_norm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def _norm(p, dim):
2020
HALF_TYPES = (torch.cuda.HalfTensor, torch.HalfTensor)
2121

2222
class WeightNorm(Reparameterization):
23-
"""
23+
r"""
2424
Weight normalization is a reparameterization that decouples the magnitude
2525
of a weight tensor from its direction. This replaces the parameter specified
2626
by `name` (e.g. "weight") with two parameters: one specifying the magnitude

requirements_dev.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-r requirements.txt
2+
flake8>=3.7.9
3+
Sphinx>=3.0.3

0 commit comments

Comments
 (0)