starttrainedmodeldeployment

package
v8.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 15 Imported by: 4

Documentation

Overview

Start a trained model deployment.

Index

Constants

This section is empty.

Variables

View Source
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 Response added in v8.7.0

type Response struct {
	Assignment types.TrainedModelAssignment `json:"assignment"`
}

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

type StartTrainedModelDeployment

type StartTrainedModelDeployment struct {
	// contains filtered or unexported fields
}

func (*StartTrainedModelDeployment) CacheSize

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) Do

Do runs the request through the transport, handle the response and returns a starttrainedmodeldeployment.Response

func (*StartTrainedModelDeployment) Header

Header set a key, value pair in the StartTrainedModelDeployment headers map.

func (*StartTrainedModelDeployment) HttpRequest

func (r *StartTrainedModelDeployment) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (StartTrainedModelDeployment) IsSuccess

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

ModelId The unique identifier of the trained model. Currently, only PyTorch models are supported. API Name: modelid

func (*StartTrainedModelDeployment) NumberOfAllocations

func (r *StartTrainedModelDeployment) NumberOfAllocations(numberofallocations 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) Perform added in v8.7.0

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*StartTrainedModelDeployment) Priority added in v8.7.0

Priority The deployment priority. API name: priority

func (*StartTrainedModelDeployment) QueueCapacity

func (r *StartTrainedModelDeployment) QueueCapacity(queuecapacity 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(threadsperallocation 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

Timeout Specifies the amount of time to wait for the model to deploy. API name: timeout

func (*StartTrainedModelDeployment) WaitFor

WaitFor Specifies the allocation status to wait for before returning. API name: wait_for

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL