Module sktmls.ml_features

Sub-modules

sktmls.ml_features.ml_feature

Classes

class MLFeature (**kwargs)

AutoML 피쳐 클래스.

Attributes

  • id: (int) 피쳐 ID
  • name: (str) 이름
  • source: (str) 원천 경로
  • type: (MLFeature.Type) 타입
  • status: (MLFeature.Status) 서비스 상태
  • title: (str) 타이틀
  • description: (str) 설명
  • group: (str) 피쳐 그룹
  • created_at: (datetime.datetime) 생성 시각
  • updated_at: (datetime.datetime) 갱신 시각

Class variables

var Status

AutoML 피쳐 상태입니다.

  • CREATED: 생성됨
  • IN_SERVICE: 서비스 중
  • DEPRECATED: 더 이상 지원하지 않음
var Type

AutoML 피쳐 타입입니다.

  • CATEGORY: 카테고리형
  • NUMBER: 수치형

Methods

def reset(self, **kwargs)
class MLFeatureClient (env: MLSENV = None, runtime_env: MLSRuntimeENV = None, username: str = None, password: str = None)

AutoML 피쳐 관련 기능을 제공하는 클라이언트 클래스입니다.

Args

아래의 환경 변수가 정의된 경우 해당 파라미터를 생략 가능합니다.

  • $MLS_ENV: env
  • $MLS_RUNTIME_ENV: runtime_env
  • $MLS_USERNAME: username
  • $MLS_PASSWORD: password

Returns

MLFeatureClient

Example

client = MLFeatureClient(env=MLSENV.STG, username="mls_account", password="mls_password")

Ancestors

Methods

def create_feature(self, name: str, source: str, type: MLFeature.Type, title: str = None, description: str = None) ‑> MLFeature

새로운 AutoML 피쳐를 생성합니다.

Args

  • name: (str) 이름
  • source: (str) 원천 경로
  • type: (MLFeature.Type) 타입
  • title: (optional) (str) 타이틀
  • description: (optional) (str) 설명

Returns

MLFeature

def delete_feature(self, ml_feature: MLFeature)

AutoML 피쳐를 삭제합니다.

Args

  • ml_feature: (MLFeature) AutoML 피쳐 객체

Returns

MLSResponse

Example

client.delete_feature(ml_feature)
def get_feature(self, id: int = None, name: str = None, source: str = None) ‑> MLFeature

AutoML 피쳐를 가져옵니다.

Args

id 또는 name, source 조합 중 하나만 입력 가능합니다.

  • id: (int) 피쳐 ID
  • name: (str) 이름
  • source: (str) 원천 경로

Returns

MLFeature - id: (int) 피쳐 ID - name: (str) 이름 - source: (str) 원천 경로 - type: (MLFeature.Type) 타입 - status: (MLFeature.Status) 서비스 상태 - title: (str) 타이틀 - description: (str) 설명 - created_at: (datetime.datetime) 생성 시각 - updated_at: (datetime.datetime) 갱신 시각

Example

ml_feature = client.get_feature(id=1)
def list_features(self, **kwargs) ‑> List[MLFeature]

AutoML 피쳐의 리스트를 가져옵니다.

Args

  • kwargs: (optional) (dict) 쿼리 조건
    • id: (int) 피쳐 ID
    • name: (str) 이름
    • source: (str) 원천 경로
    • type: (MLFeature.Type) 타입
    • status: (MLFeature.Status) 서비스 상태
    • title: (str) 타이틀
    • description: (str) 설명
    • query: (str) 검색 문자
    • page: (int) 페이지 번호

Returns

list(MLFeature)

Example

ml_features = client.list_features()
def update_feature(self, ml_feature: MLFeature, title: str = None, description: str = None, status: MLFeature.Status = None) ‑> MLFeature

AutoML 피쳐를 수정합니다.

Args

  • title: (optional) (str) 타이틀
  • description: (optional) (str) 설명
  • status: (MLFeature.Status) 서비스 상태

Returns

MLFeature

class MLFeatureGroupClient (env: MLSENV = None, runtime_env: MLSRuntimeENV = None, username: str = None, password: str = None)

AutoML 피쳐 그룹 관련 기능을 제공하는 클라이언트 클래스입니다.

Args

아래의 환경 변수가 정의된 경우 해당 파라미터를 생략 가능합니다.

  • $MLS_ENV: env
  • $MLS_RUNTIME_ENV: runtime_env
  • $MLS_USERNAME: username
  • $MLS_PASSWORD: password

Returns

MLFeatureGroupClient

Example

client = MLFeatureGroupClient(env=MLSENV.STG, username="mls_account", password="mls_password")

Ancestors

Methods

def list_feature_groups(self) ‑> List[MLFeatureGroup]

AutoML 피쳐 그룹 리스트를 가져옵니다.

Returns

list(MLFeatureGroup)

Example

feature_groups = client.list_feature_groups()