Documentation ¶
Overview ¶
Update a trained model deployment.
Index ¶
- Variables
- type NewUpdateTrainedModelDeployment
- type Request
- type Response
- type UpdateTrainedModelDeployment
- func (r UpdateTrainedModelDeployment) Do(providedCtx context.Context) (*Response, error)
- func (r *UpdateTrainedModelDeployment) ErrorTrace(errortrace bool) *UpdateTrainedModelDeployment
- func (r *UpdateTrainedModelDeployment) FilterPath(filterpaths ...string) *UpdateTrainedModelDeployment
- func (r *UpdateTrainedModelDeployment) Header(key, value string) *UpdateTrainedModelDeployment
- func (r *UpdateTrainedModelDeployment) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *UpdateTrainedModelDeployment) Human(human bool) *UpdateTrainedModelDeployment
- func (r *UpdateTrainedModelDeployment) NumberOfAllocations(numberofallocations int) *UpdateTrainedModelDeployment
- func (r UpdateTrainedModelDeployment) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *UpdateTrainedModelDeployment) Pretty(pretty bool) *UpdateTrainedModelDeployment
- func (r *UpdateTrainedModelDeployment) Raw(raw io.Reader) *UpdateTrainedModelDeployment
- func (r *UpdateTrainedModelDeployment) Request(req *Request) *UpdateTrainedModelDeployment
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 NewUpdateTrainedModelDeployment ¶
type NewUpdateTrainedModelDeployment func(modelid string) *UpdateTrainedModelDeployment
NewUpdateTrainedModelDeployment type alias for index.
func NewUpdateTrainedModelDeploymentFunc ¶
func NewUpdateTrainedModelDeploymentFunc(tp elastictransport.Interface) NewUpdateTrainedModelDeployment
NewUpdateTrainedModelDeploymentFunc returns a new instance of UpdateTrainedModelDeployment with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.
type Request ¶
type Request struct { // 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. NumberOfAllocations *int `json:"number_of_allocations,omitempty"` }
Request holds the request body struct for the package updatetrainedmodeldeployment
type Response ¶
type Response struct {
Assignment types.TrainedModelAssignment `json:"assignment"`
}
Response holds the response body struct for the package updatetrainedmodeldeployment
type UpdateTrainedModelDeployment ¶
type UpdateTrainedModelDeployment struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *UpdateTrainedModelDeployment
Update a trained model deployment.
https://www.elastic.co/guide/en/elasticsearch/reference/current/update-trained-model-deployment.html
func (UpdateTrainedModelDeployment) Do ¶
func (r UpdateTrainedModelDeployment) Do(providedCtx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a updatetrainedmodeldeployment.Response
func (*UpdateTrainedModelDeployment) ErrorTrace ¶
func (r *UpdateTrainedModelDeployment) ErrorTrace(errortrace bool) *UpdateTrainedModelDeployment
ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace
func (*UpdateTrainedModelDeployment) FilterPath ¶
func (r *UpdateTrainedModelDeployment) FilterPath(filterpaths ...string) *UpdateTrainedModelDeployment
FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path
func (*UpdateTrainedModelDeployment) Header ¶
func (r *UpdateTrainedModelDeployment) Header(key, value string) *UpdateTrainedModelDeployment
Header set a key, value pair in the UpdateTrainedModelDeployment headers map.
func (*UpdateTrainedModelDeployment) HttpRequest ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*UpdateTrainedModelDeployment) Human ¶
func (r *UpdateTrainedModelDeployment) Human(human bool) *UpdateTrainedModelDeployment
Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human
func (*UpdateTrainedModelDeployment) NumberOfAllocations ¶
func (r *UpdateTrainedModelDeployment) NumberOfAllocations(numberofallocations int) *UpdateTrainedModelDeployment
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 (UpdateTrainedModelDeployment) Perform ¶
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*UpdateTrainedModelDeployment) Pretty ¶
func (r *UpdateTrainedModelDeployment) Pretty(pretty bool) *UpdateTrainedModelDeployment
Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty
func (*UpdateTrainedModelDeployment) Raw ¶
func (r *UpdateTrainedModelDeployment) Raw(raw io.Reader) *UpdateTrainedModelDeployment
Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.
func (*UpdateTrainedModelDeployment) Request ¶
func (r *UpdateTrainedModelDeployment) Request(req *Request) *UpdateTrainedModelDeployment
Request allows to set the request property with the appropriate payload.