Module sktmls.models.mls_model
Classes
class MLSCatBoostModel (model, model_name: str, model_version: str, features: List[str])
-
MLS 모델 레지스트리에 등록되는 단일 CatBoost 기반 상위 클래스입니다.
Ancestors
Subclasses
Inherited members
class MLSGenericModel (models, model_name: str, model_version: str, features: List[str], custom_predict_async: Union[str, Callable] = None)
-
MLS 모델 레지스트리에 등록되는 제네릭 모델 기반 상위 클래스입니다.
Ancestors
Subclasses
- ConditionalGenericLogicModel
- DefaultGenericModel
- GenericContextModel
- GenericLogicModel
- SampleGenericModel
Methods
def load_custom_predict_async(self, file_path: str = None) ‑> Callable
def predict(self, x: List[Any], **kwargs) ‑> Dict[str, Any]
async def predict_async(self, x: List[Any], **kwargs) ‑> Dict[str, Any]
def set_model_lib(self, model_lib: str)
-
모델이 사용한 라이브러리 정보를 세팅하기 위한 함수입니다.
Inherited members
class MLSLightGBMModel (model, model_name: str, model_version: str, features: List[str] = None)
-
MLS 모델 레지스트리에 등록되는 단일 LightGBM 기반 상위 클래스입니다.
Ancestors
Subclasses
Inherited members
class MLSModel (model_name: str, model_version: str)
-
MLS 모델 레지스트리에 등록되는 최상위 클래스입니다.
Subclasses
Methods
def predict(self, x: List[Any], **kwargs) ‑> Dict[str, Any]
async def predict_async(self, x: List[Any], **kwargs) ‑> Dict[str, Any]
def save(self, env: MLSENV = None, runtime_env: MLSRuntimeENV = None, force: bool = False) ‑> NoneType
-
모델 바이너리(model.joblib)와 정보(model.json)를 MLS 모델 레지스트리에 등록합니다.
ModelRegistry.save()
와 동일하게 동작합니다.Args
- env: (
MLSENV
) 접근할 MLS 환경 (MLSENV.DEV
|MLSENV.STG
|MLSENV.PRD
) (기본값:MLSENV.STG
) - runtime_env: (
MLSRuntimeENV
) 클라이언트가 실행되는 환경 (MLSRuntimeENV.YE
|MLSRuntimeENV.EDD
|MLSRuntimeENV.LOCAL
) (기본값:MLSRuntimeENV.LOCAL
) - force: (bool) 이미 모델 레지스트리에 등록된 경우 덮어 쓸 것인지 여부 (기본값:
False
)
- env: (
class MLSModelError (msg)
-
Common base class for all non-exit exceptions.
Ancestors
- builtins.Exception
- builtins.BaseException
class MLSPyTorchModel (model, model_name: str, model_version: str, features: List[str])
-
MLS 모델 레지스트리에 등록되는 단일 PyTorch 기반 상위 클래스입니다.
Ancestors
Subclasses
Inherited members
class MLSRuleModel (model_name: str, model_version: str, features: List[str])
-
MLS 모델 레지스트리에 등록되는 Rule 기반 상위 클래스입니다.
Ancestors
Subclasses
- InfoDefectRuleModel
- InfoUnpaidRuleModel
- SampleRuleModel
- TwRandomGreetingRuleModel
- VasXcloudRuleModel
Inherited members
class MLSXGBoostModel (model, model_name: str, model_version: str, features: List[str])
-
MLS 모델 레지스트리에 등록되는 단일 XGBoost 기반 상위 클래스입니다.
Ancestors
Subclasses
Inherited members