Skip to main content

Create endpoint

create(args)

Create custom endpoint with TruServeClient.

serve.create(
alias ="my_custom_endpoint",
title="MyEndpoint",
instance_type=InstanceType.Medium,
instance_count=1,
script_path="customEndpoint/model_v1.py",
requirements_path="customEndpoint/requirements.txt",
description="My first custom endpoint",
local_file=False
)

Parameters

ParamTypeDescriptionRequired
aliasstrUnique value to identify endpointTrue
titlestrTitle of endpointTrue
instance_typeInstance TypeType of the InstanceTrue
instance_countintNumber of the InstancesTrue
script_pathstrPython scriptTrue
requirements_pathstrText file with needed requirementsFalse
descriptionstrDescription for endpointFalse
local_fileboolIt means you are uploading Script and Requirements Path locally, or False if you want to get them from TruStorageFalse, default True