[NFC] polish colossalai/nn/lr_scheduler/torch.py code style (#1571)

Co-authored-by: Research <research@soccf-snr3-017.comp.nus.edu.sg>
pull/1550/head
superhao1995 2022-09-08 16:33:23 +08:00 committed by Frank Lee
parent 3263cdf57f
commit e4bf7ae667
1 changed files with 2 additions and 4 deletions

View File

@ -58,8 +58,7 @@ class StepLR(_StepLR):
"""
def __init__(self, optimizer, total_steps, step_size: int = 1, gamma: float = 0.1, last_epoch: int = -1) -> None:
super().__init__(optimizer, step_size,
gamma=gamma, last_epoch=last_epoch)
super().__init__(optimizer, step_size, gamma=gamma, last_epoch=last_epoch)
@LR_SCHEDULERS.register_module
@ -74,6 +73,5 @@ class ExponentialLR(_ExponentialLR):
last_epoch (int, optional): The index of last epoch, defaults to -1.
"""
def __init__(self, optimizer, total_steps, gamma: float = 1.0,
last_epoch: int = -1) -> None:
def __init__(self, optimizer, total_steps, gamma: float = 1.0, last_epoch: int = -1) -> None:
super().__init__(optimizer, gamma, last_epoch=last_epoch)