Deployments¶
aana.deployments
¶
AanaDeploymentHandle
¶
AanaDeploymentHandle(deployment_name, num_retries=3, retry_exceptions=False, retry_delay=0.2, retry_max_delay=2.0)
A handle to interact with a deployed Aana deployment.
Use create method to create a deployment handle.
ATTRIBUTE | DESCRIPTION |
---|---|
handle |
Ray Serve deployment handle.
TYPE:
|
deployment_name |
The name of the deployment.
TYPE:
|
PARAMETER | DESCRIPTION |
---|---|
deployment_name |
The name of the deployment.
TYPE:
|
num_retries |
The maximum number of retries for the method.
TYPE:
|
retry_exceptions |
Whether to retry on application-level errors or a list of exceptions to retry on.
TYPE:
|
retry_delay |
The initial delay between retries.
TYPE:
|
retry_max_delay |
The maximum delay between retries.
TYPE:
|
Source code in aana/deployments/aana_deployment_handle.py
create
¶
create(deployment_name, num_retries=3, retry_exceptions=False, retry_delay=0.2, retry_max_delay=2.0)
Create a deployment handle.
PARAMETER | DESCRIPTION |
---|---|
deployment_name |
The name of the deployment to interact with.
TYPE:
|
num_retries |
The maximum number of retries for the method.
TYPE:
|
retry_exceptions |
Whether to retry on application-level errors or a list of exceptions to retry on.
TYPE:
|
retry_delay |
The initial delay between retries.
TYPE:
|
retry_max_delay |
The maximum delay between retries.
TYPE:
|
Source code in aana/deployments/aana_deployment_handle.py
BaseDeployment
¶
Base class for all deployments.
To create a new deployment, inherit from this class and implement the apply_config
method
and your custom methods like generate
, predict
, etc.
Source code in aana/deployments/base_deployment.py
check_health
¶
Check the health of the deployment.
Source code in aana/deployments/base_deployment.py
apply_config
¶
Apply the configuration.
This method is called when the deployment is created or updated.
Define the logic to load the model and configure it here.
PARAMETER | DESCRIPTION |
---|---|
config |
the configuration
TYPE:
|