Konan Types
- class konan_sdk.konan_types.KonanCredentials(email: str, password: str)
Bases:
object
Credentials to use to authenticate with the Konan API.
- class konan_sdk.konan_types.KonanTokens(access: str, refresh: str)
Bases:
object
API Token retrieved by successfully authenticating with the Konan API.
- class konan_sdk.konan_types.KonanPrediction(uuid: str, output: Dict[str, Any], features: Optional[Dict[str, Any]] = None, feedback: Optional[Union[str, Dict[str, Any], Any]] = None)
Bases:
object
Successful prediction registered with the Konan API.
- class konan_sdk.konan_types.KonanDockerCredentials(username: str, password: str)
Bases:
object
Credentials to use to authenticate with the Docker ContainerRegistry.
- class konan_sdk.konan_types.KonanDockerImage(url: str, exposed_port: int)
Bases:
object
Docker image to use for Konan Model creation.
- class konan_sdk.konan_types.KonanModelState(value)
Bases:
Enum
Different states a KonanModel can be in
- Parameters
Enum ([type]) – [description]
- Live = 'live'
Model Live State
- Challenger = 'challenger'
Model Challenger State
- Disabled = 'disabled'
Model Disabled State
- Other = 'other'
Model Other State
- class konan_sdk.konan_types.KonanModelCreationRequest(name: str, docker_credentials: Optional[KonanDockerCredentials], docker_image: KonanDockerImage, state: KonanModelState)
Bases:
object
Information required to create a new Konan Model.
- __init__(name: str, docker_credentials: Optional[KonanDockerCredentials], docker_image: KonanDockerImage, state: KonanModelState) None
Initialize a new KonanModelCreationRequest.
- Parameters
name (str) – Name of the new Konan Mode.
docker_credentials (Optional[KonanDockerCredentials]) – Credentials of the Docker Container Registry to use
docker_image (KonanDockerImage) – Docker Image to use as the Konan Model
- class konan_sdk.konan_types.KonanProjectCreationRequest(name: str, description: Optional[str])
Bases:
object
Information required to issue a create a new Konan Project.
- class konan_sdk.konan_types.KonanDeploymentCreationRequest(name: str, description: Optional[str], model_creation_request: KonanModelCreationRequest)
Bases:
KonanProjectCreationRequest
Information required to issue a create a new Konan Deployment.
- __init__(name: str, description: Optional[str], model_creation_request: KonanModelCreationRequest) None
Initialize a new KonanDeploymentCreationRequest.
- Parameters
name (str) – Name of the new Konan Project.
description (str) – Description of the new Konan Project.
model_creation_request (KonanModelCreationRequest) – Information required to create a new Konan Model.
- class konan_sdk.konan_types.KonanDeploymentErrorType(value)
Bases:
Enum
Different error types possibly returned by the Konan API when attempting to create a new Konan Deployment.
- Parameters
Enum ([type]) – [description]
- Image = 'image'
Deployment Image Error
- HealthEndpoint = 'health_endpoint'
Healthz Error
- ExposedPort = 'exposed_port'
Exposed Port Error
- class konan_sdk.konan_types.KonanDeploymentError(type: KonanDeploymentErrorType, message: str)
Bases:
object
Error returned by the Konan API when attempting to create a new Konan Deployment.
- __init__(type: KonanDeploymentErrorType, message: str) None
Initialize a new KonanDeploymentError.
- Parameters
type (KonanDeploymentErrorType) – Type of the error encountered
message (str) – Message of the error encountered
- class konan_sdk.konan_types.KonanLiveModelSwitchState(switch_to: KonanModelState, new_live_model_uuid: str)
Bases:
object
Konan Live Model Switch State
- __init__(switch_to: KonanModelState, new_live_model_uuid: str) None
Initialize a new KonanLiveModelSwitchState
- Parameters
switch_to (KonanModelState) – state of model to switch to
new_live_model_uuid (str) – UUID of the model to promote to live
- class konan_sdk.konan_types.KonanModel(uuid: str, name: str, created_at: datetime, state: KonanModelState)
Bases:
object
Konan Model
- __init__(uuid: str, name: str, created_at: datetime, state: KonanModelState) None
Initialize a new KonanModel
- Parameters
uuid (str) – UUID of the Konan Mode
name (str) – Name of the Konan Mode
created_at (datetime.datetime) – Konan Model creation date and time
state (KonanModelState) – State of the Konan Model
- class konan_sdk.konan_types.KonanDeployment(uuid: str, name: str, created_at: datetime)
Bases:
object
Konan Deployment.
- class konan_sdk.konan_types.KonanDeploymentCreationResponse(deployment: KonanDeployment, live_model: KonanModel, errors: List[KonanDeploymentError], container_logs: str)
Bases:
object
Information returned by the Konan API when attempting to create a new Konan Deployment.
- __init__(deployment: KonanDeployment, live_model: KonanModel, errors: List[KonanDeploymentError], container_logs: str) None
Initialize a new KonanDeploymentCreationResponse.
- Parameters
deployment (KonanDeployment) – Konan Deployment Created
errors (List[KonanDeploymentError]) – Errors encountered when attempting to create the new Konan Deployment
container_logs (str) – Container logs generated when creating the new Konan Deployment
- class konan_sdk.konan_types.KonanTimeWindow(start_time: datetime, end_time: datetime)
Bases:
object
Konan Time Window of certain events.
- __init__(start_time: datetime, end_time: datetime) None
Initialize a new KonanTimeWindow.
- Parameters
start_time (datetime.datetime) – Starting date and time of events to consider
end_time (datetime.datetime) – Ending date and time of events to consider
- class konan_sdk.konan_types.KonanFeedbackSubmission(prediction_uuid: str, target: Union[Dict, str])
Bases:
object
Konan Feedback to send to the Konan API.
- class konan_sdk.konan_types.KonanFeedbackStatus(prediction_uuid: str, status: int, message: str)
Bases:
object
Feedback Status returned by the Konan API.
- class konan_sdk.konan_types.KonanFeedbacksResult(feedbacks_status: List[KonanFeedbackStatus], success_count: int, failure_count: int, total_count: int)
Bases:
object
Bulk results of the Konan API when submitting Feedbacks.
- __init__(feedbacks_status: List[KonanFeedbackStatus], success_count: int, failure_count: int, total_count: int) None
Initialize a new KonanFeedbacksResult.
- Parameters
feedbacks_status (List[KonanFeedbackStatus]) – Status of all submitted Feedbacks
success_count (int) – Number of successfully created Feedbacks
failure_count (int) – Number of failed Feedbacks to create
total_count (int) – Total number of Feedbacks submitted