6.4 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

The Pipeline store is not yet available, but it’s coming soon, so stay tuned.

6.4.1 Summary

  1. Get information about a deployment

  2. Delete a deployment

  3. Follow the execution tracking

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.

6.4.2 Get information about a deployment

6.4.2.1 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.

6.4.2.2 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

6.4.3 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.

6.4.4 Follow the execution tracking

6.4.4.1 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.

6.4.4.2 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.