[NFC] polish colossalai/builder/builder.py code style (#662)

pull/673/head
lucasliunju 2022-04-03 11:59:57 +08:00 committed by binmakeswell
parent 331683bf82
commit e4bcff9b0f
1 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@ from collections.abc import Iterable
from colossalai.registry import *
def build_from_config(module, config: dict):
"""Returns an object of :class:`module` constructed from `config`.
@ -64,6 +65,7 @@ def build_from_registry(config, registry: Registry):
return obj
def build_layer(config):
"""Returns a layer object of :class:`nn.Module` constructed from `config`.
@ -243,7 +245,6 @@ def build_lr_scheduler(config, optimizer):
config_['optimizer'] = optimizer
return build_from_registry(config_, LR_SCHEDULERS)
def build_schedule(config):
"""Returns a schedule of :class:`colossalai.engine.schedule.BaseSchedule`.