Deploy#
lit.sdk.services.deploy
#
This module defines the Deploy class, an abstract subclass of Service, which represents a deployment service.
The class provides methods for managing deployment actions such as starting, stopping, restarting, and checking the status of the deploy.
It also includes abstract methods for adding and removing models from the deploy.
Deploy
#
Bases: Service
Represents a model deployment service worker.
name
instance-attribute
#
The name of the deploy.
team
instance-attribute
#
The name of the team that owns the deploy.
__init__(team, name)
#
Initializes a new instance of Deploy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
team
|
str
|
The name of the team that owns the Deploy. |
required |
name
|
str
|
The name of the Deploy. |
required |
add_model(model)
#
Adds a vaulted model to the deploy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
The name of the model to add. |
required |
Returns:
| Type | Description |
|---|---|
ServiceActionStatus
|
a dictionary containing status of operation. |
Examples:
remove_model(model)
#
Removes a vaulted model from the deploy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
model
|
str
|
The name of the model to remove. |
required |
Returns:
| Type | Description |
|---|---|
ServiceActionStatus
|
a dictionary containing status of operation. |
Examples:
restart()
#
Restarts the deploy.
Returns:
| Name | Type | Description |
|---|---|---|
ServiceActionStatus |
ServiceActionStatus
|
A dictionary containing the status of the operation. |
Raises:
| Type | Description |
|---|---|
LitServiceError
|
If the deploy failed to restart. |
Examples:
start()
#
Starts the deploy.
Returns:
| Name | Type | Description |
|---|---|---|
ServiceActionStatus |
ServiceActionStatus
|
A dictionary containing the status of the operation. |
Raises:
| Type | Description |
|---|---|
LitServiceError
|
If the deploy failed to start. |
Examples:
status()
#
Retrieves the status of the deploy.
Returns:
| Name | Type | Description |
|---|---|---|
ServiceStatus |
ServiceStatus
|
A dictionary containing the current status of the deploy. |
Raises:
| Type | Description |
|---|---|
LitServiceError
|
If the deploy failed to be queried. |
Examples:
stop()
#
Stops the deploy.
Returns:
| Name | Type | Description |
|---|---|---|
ServiceActionStatus |
ServiceActionStatus
|
A dictionary containing the status of the operation. |
Raises:
| Type | Description |
|---|---|
LitServiceError
|
If the deploy failed to stop. |
Examples: