mirror of https://github.com/hpcaitech/ColossalAI
[NFC] polish colossalai/builder/builder.py code style (#662)
parent
331683bf82
commit
e4bcff9b0f
|
@ -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`.
|
||||
|
||||
|
|
Loading…
Reference in New Issue