estimatemodelmemory

package
v8.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Overview

Estimates the model memory

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 EstimateModelMemory

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

func (EstimateModelMemory) Do

Do runs the http.Request through the provided transport.

func (*EstimateModelMemory) Header

func (r *EstimateModelMemory) Header(key, value string) *EstimateModelMemory

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

func (*EstimateModelMemory) HttpRequest

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

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

func (*EstimateModelMemory) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*EstimateModelMemory) Request

Request allows to set the request property with the appropriate payload.

type NewEstimateModelMemory

type NewEstimateModelMemory func() *EstimateModelMemory

NewEstimateModelMemory type alias for index.

func NewEstimateModelMemoryFunc

func NewEstimateModelMemoryFunc(tp elastictransport.Interface) NewEstimateModelMemory

NewEstimateModelMemoryFunc returns a new instance of EstimateModelMemory 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 {

	// AnalysisConfig For a list of the properties that you can specify in the
	// `analysis_config` component of the body of this API.
	AnalysisConfig *types.AnalysisConfig `json:"analysis_config,omitempty"`

	// MaxBucketCardinality Estimates of the highest cardinality in a single bucket that is observed
	// for influencer fields over the time period that the job analyzes data.
	// To produce a good answer, values must be provided for all influencer
	// fields. Providing values for fields that are not listed as `influencers`
	// has no effect on the estimation.
	MaxBucketCardinality map[types.Field]int64 `json:"max_bucket_cardinality,omitempty"`

	// OverallCardinality Estimates of the cardinality that is observed for fields over the whole
	// time period that the job analyzes data. To produce a good answer, values
	// must be provided for fields referenced in the `by_field_name`,
	// `over_field_name` and `partition_field_name` of any detectors. Providing
	// values for other fields has no effect on the estimation. It can be
	// omitted from the request if no detectors have a `by_field_name`,
	// `over_field_name` or `partition_field_name`.
	OverallCardinality map[types.Field]int64 `json:"overall_cardinality,omitempty"`
}

Request holds the request body struct for the package estimatemodelmemory

https://github.com/elastic/elasticsearch-specification/blob/4316fc1aa18bb04678b156f23b22c9d3f996f9c9/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L61

type RequestBuilder

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

RequestBuilder is the builder API for the estimatemodelmemory.Request

func NewRequestBuilder

func NewRequestBuilder() *RequestBuilder

NewRequest returns a RequestBuilder which can be chained and built to retrieve a RequestBuilder

func (*RequestBuilder) AnalysisConfig

func (rb *RequestBuilder) AnalysisConfig(analysisconfig *types.AnalysisConfigBuilder) *RequestBuilder

func (*RequestBuilder) Build

func (rb *RequestBuilder) Build() *Request

Build finalize the chain and returns the Request struct.

func (*RequestBuilder) FromJSON

func (rb *RequestBuilder) FromJSON(data string) (*Request, error)

FromJSON allows to load an arbitrary json into the request structure

func (*RequestBuilder) MaxBucketCardinality

func (rb *RequestBuilder) MaxBucketCardinality(value map[types.Field]int64) *RequestBuilder

func (*RequestBuilder) OverallCardinality

func (rb *RequestBuilder) OverallCardinality(value map[types.Field]int64) *RequestBuilder

Jump to

Keyboard shortcuts

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