Documentation ¶
Overview ¶
Start a trained model deployment.
Index ¶
- Variables
- type NewStartTrainedModelDeployment
- type StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) CacheSize(value string) *StartTrainedModelDeployment
- func (r StartTrainedModelDeployment) Do(ctx context.Context) (*http.Response, error)
- func (r *StartTrainedModelDeployment) Header(key, value string) *StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r StartTrainedModelDeployment) IsSuccess(ctx context.Context) (bool, error)
- func (r *StartTrainedModelDeployment) ModelId(v string) *StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) NumberOfAllocations(i int) *StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) QueueCapacity(i int) *StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) ThreadsPerAllocation(i int) *StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) Timeout(value string) *StartTrainedModelDeployment
- func (r *StartTrainedModelDeployment) WaitFor(enum deploymentallocationstate.DeploymentAllocationState) *StartTrainedModelDeployment
Constants ¶
This section is empty.
Variables ¶
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")
ErrBuildPath is returned in case of missing parameters within the build of the request.
Functions ¶
This section is empty.
Types ¶
type NewStartTrainedModelDeployment ¶
type NewStartTrainedModelDeployment func(modelid string) *StartTrainedModelDeployment
NewStartTrainedModelDeployment type alias for index.
func NewStartTrainedModelDeploymentFunc ¶
func NewStartTrainedModelDeploymentFunc(tp elastictransport.Interface) NewStartTrainedModelDeployment
NewStartTrainedModelDeploymentFunc returns a new instance of StartTrainedModelDeployment with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type StartTrainedModelDeployment ¶
type StartTrainedModelDeployment struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *StartTrainedModelDeployment
Start a trained model deployment.
https://www.elastic.co/guide/en/elasticsearch/reference/master/start-trained-model-deployment.html
func (*StartTrainedModelDeployment) CacheSize ¶
func (r *StartTrainedModelDeployment) CacheSize(value string) *StartTrainedModelDeployment
CacheSize The inference cache size (in memory outside the JVM heap) per node for the model. The default value is the same size as the `model_size_bytes`. To disable the cache, `0b` can be provided. API name: cache_size
func (*StartTrainedModelDeployment) Header ¶
func (r *StartTrainedModelDeployment) Header(key, value string) *StartTrainedModelDeployment
Header set a key, value pair in the StartTrainedModelDeployment headers map.
func (*StartTrainedModelDeployment) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (StartTrainedModelDeployment) IsSuccess ¶
func (r StartTrainedModelDeployment) IsSuccess(ctx context.Context) (bool, error)
IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.
func (*StartTrainedModelDeployment) ModelId ¶
func (r *StartTrainedModelDeployment) ModelId(v string) *StartTrainedModelDeployment
ModelId The unique identifier of the trained model. Currently, only PyTorch models are supported. API Name: modelid
func (*StartTrainedModelDeployment) NumberOfAllocations ¶
func (r *StartTrainedModelDeployment) NumberOfAllocations(i int) *StartTrainedModelDeployment
NumberOfAllocations The number of model allocations on each node where the model is deployed. All allocations on a node share the same copy of the model in memory but use a separate set of threads to evaluate the model. Increasing this value generally increases the throughput. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. API name: number_of_allocations
func (*StartTrainedModelDeployment) QueueCapacity ¶
func (r *StartTrainedModelDeployment) QueueCapacity(i int) *StartTrainedModelDeployment
QueueCapacity Specifies the number of inference requests that are allowed in the queue. After the number of requests exceeds this value, new requests are rejected with a 429 error. API name: queue_capacity
func (*StartTrainedModelDeployment) ThreadsPerAllocation ¶
func (r *StartTrainedModelDeployment) ThreadsPerAllocation(i int) *StartTrainedModelDeployment
ThreadsPerAllocation Sets the number of threads used by each model allocation during inference. This generally increases the inference speed. The inference process is a compute-bound process; any number greater than the number of available hardware threads on the machine does not increase the inference speed. If this setting is greater than the number of hardware threads it will automatically be changed to a value less than the number of hardware threads. API name: threads_per_allocation
func (*StartTrainedModelDeployment) Timeout ¶
func (r *StartTrainedModelDeployment) Timeout(value string) *StartTrainedModelDeployment
Timeout Specifies the amount of time to wait for the model to deploy. API name: timeout
func (*StartTrainedModelDeployment) WaitFor ¶
func (r *StartTrainedModelDeployment) WaitFor(enum deploymentallocationstate.DeploymentAllocationState) *StartTrainedModelDeployment
WaitFor Specifies the allocation status to wait for before returning. API name: wait_for