Create and update Deployments
Preparation
In order to deploy models, you need a personal key pair. For more information regarding authentication, see Authentication.
Another part of the preparation is getting familiar with the repository contract that Deeploy uses, you can find more information about that here. If your model is stored elsewhere and you do not yet adhere to the contract, you generate a reference.json.
Managed Deployments
Create a managed Deployment
See all Create Deployment arguments
from deeploy import CreateDeployment
from deeploy.enums import ModelType
create_options: CreateDeployment = {
"name": "Python Client",
"description": "Python Client Description",
"repository_id": "b6d8c781-2526-4e03-9b43-4c1a62d064db",
"branch_name": "master",
"commit": "b26af7790c1d3b27b953b37806b91cb6735c590b",
"model_type": ModelType.CUSTOM,
"model_min_replicas": 0,
}
deployment = client.create_deployment(create_options)
Update a managed Deployment
See all Update Deployment arguments
from deeploy import UpdateDeployment
update_options: UpdateDeployment = {
"model_mem_request": 256,
"model_mem_limit": 256,
"model_cpu_request": 0.1,
"model_cpu_limit": 0.5,
}
updated_deployment = client.update_deployment(deployment_id=deployment.id, options=update_options)