Safemotion Lib
Loading...
Searching...
No Matches
Functions
model_builder Namespace Reference

Functions

 build_action_model (args)
 

Function Documentation

◆ build_action_model()

model_builder.build_action_model ( args)
action/models 의 모듈을 빌드하는 함수

args : 
    type -> 모듈의 타입  __model_builders__의 키값이 들어가야함
    type을 제외한 나머지 파라미터는 모듈의 파라미터값이 있어야함

returns:
    파이토이 모델(모듈)

Definition at line 24 of file model_builder.py.

24def build_action_model(args):
25 """
26 action/models 의 모듈을 빌드하는 함수
27
28 args :
29 type -> 모듈의 타입 __model_builders__의 키값이 들어가야함
30 type을 제외한 나머지 파라미터는 모듈의 파라미터값이 있어야함
31
32 returns:
33 파이토이 모델(모듈)
34 """
35 assert args.type in __model_builders__, \
36 f'not found action model type : {args.type}'
37
38 runner_builder = __model_builders__[args.type]
39 runner_args = args.copy()
40 runner_args.pop('type')
41 return runner_builder(**runner_args)