Public Profiles
TensorBoards

Deployments Client

Importing

from gradient import DeploymentsClient
api_key='YOUR_API_KEY'
deployment_client = DeploymentsClient(api_key)

Select model to deploy

Get a model to deploy by either selecting experiment output or filtering based on some criteria from a project

model = models_client.list(experiment_id = experiment_id)[0]

Deployment parameters

deployment_param = {
"deployment_type" : "Tensorflow Serving on K8s",
"image_url": "tensorflow/serving:latest-gpu",
"name": "sdk_tutorial",
"machine_type": "K80",
"instance_count": 2,
"model_id" : model.id
}

Create the deployment

deployment_id = deployment_client.create(**deploy_param)

Start the deployment

deployment_client.start(deployment_id)

Stop a deployment

deployment_client.stop(deployment_id)