Follow the deployment executions
A deployment is a way to run a Machine Learning pipeline in a repeatable and automated way. Once it is created, you can find the setup of your deployments in the pipeline store. In addition, you can find all the information about the executions of the deployments in the execution tracking.
Warning
Dates provided by the Web UI and SDK are always expressed in Coordinated Universal Time (UTC).
Summary
Function name |
Method |
Return type |
Description |
---|---|---|---|
list_deployments |
list_deployments() |
list of dict |
Get the list of all deployments. |
get_deployment |
get_deployment(deployment_name) |
dict |
Get information of a deployment. |
delete_deployment |
delete_deployment(deployment_name) |
dict |
Delete a deployment identified by its name. |
get_pipeline_execution |
get_pipeline_execution(pipeline_name, execution_id) |
dict |
Get the status of one pipeline execution identified by its name. |
Get information about a deployment
List of deployments
Get the list of all deployments.
CraftAiSdk.list_deployments()
Returns
List of deployments represented as dict (with keys “id”, “name” and “pipeline”). The return data type is list of dict.
Get deployment information
Get information of a deployment.
CraftAiSdk.get_deployment(*deployment_name*)
Parameters
deployment_name
(str) – Name of the deployment.
Returns
Deployment information represented as dict (with keys “id”, “name” and “pipeline”).
Return type
dict
Delete a deployment
Delete a deployment identified by its name.
CraftAiSdk.delete_deployment(*deployment_name*)
Parameters
deployment_name
(str) – Name of the deployment.
Returns
Deleted deployment represented as dict (with keys “id”, “name”). The return data type is dict.
Warning
Be careful, deleting a deployment will delete all its executions.
Follow the execution tracking
Get execution list
Get the status of one pipeline execution identified by its name.
CraftAiSdk.get_pipeline_execution(*pipeline_name*, *execution_id*)
Parameters
pipeline_name
(str) – Name of an existing pipeline.execution_id
(str) – ID of the pipeline execution.
Returns
Information on the pipeline execution with id execution_id represented as dict.
Get execution logs
Get the logs of an executed pipeline identified by its name.
CraftAiSdk.CraftAiSdk.get_pipeline_execution_logs(*pipeline_name*, *execution_id*,
from_datetime=None, to_datetime=None, limit=None)
Parameters
pipeline_name
(str) – Name of an existing pipeline.execution_id
(str) – ID of the pipeline execution.from_datetime
(datetime.time, optional) – Datetime from which the logs are collected.to_datetime
(datetime.time, optional) – Datetime until which the logs are collected.limit
(int, optional) – Maximum number of logs that are collected.
Returns
List of collected logs represented as dict (with keys “message”, “timestamp” and “stream”). The return type is a list.