Konan Service

class konan_sdk.konan_service.services.KonanService(predict_request_class: ~typing.Type, predict_response_class: ~typing.Type, model_class: ~typing.Type, feedback_target_class: ~typing.Optional[~typing.Type] = None, evaluate_response_class: ~typing.Type = <class 'konan_sdk.konan_service.serializers.KonanServiceBaseEvaluateResponse'>, *model_args, **model_kwargs)

Bases: object

Class that implements a Konan webservice

__init__(predict_request_class: ~typing.Type, predict_response_class: ~typing.Type, model_class: ~typing.Type, feedback_target_class: ~typing.Optional[~typing.Type] = None, evaluate_response_class: ~typing.Type = <class 'konan_sdk.konan_service.serializers.KonanServiceBaseEvaluateResponse'>, *model_args, **model_kwargs) None

Initializes a konan service

Parameters
  • predict_request_class (Type) – Type of a prediction request. Should be a class that inherits from KonanServiceBasePredictionRequest

  • predict_response_class (Type) – Type of a prediction response. Should be a class that inherits from KonanServiceBasePredictionResponse

  • model_class (Type) – Type of the model that does the prediction. Should be a class that inherits from KonanServiceBaseModel. Must implement the predict() and evaluate() methods

  • feedback_target_class (Type, optional) – Type of feedback target. Defaults to value of predict_response_class if None.

  • evaluate_response_class (Type, optional) – Type of an evaluation response. Should be a class that inherits from KonanServiceBaseEvaluateResponse, defaults to KonanServiceBaseEvaluateResponse

Returns

None

Return type

Type