sagemakermetrics

package
v1.44.279 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Overview

Package sagemakermetrics provides the client and types for making API requests to Amazon SageMaker Metrics Service.

Contains all data plane API operations and data types for Amazon SageMaker Metrics. Use these APIs to put and retrieve (get) features related to your training run.

See https://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30 for more information on this service.

See sagemakermetrics package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/sagemakermetrics/

Using the Client

To contact Amazon SageMaker Metrics Service with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the Amazon SageMaker Metrics Service client SageMakerMetrics for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/sagemakermetrics/#New

Index

Constants

View Source
const (
	// PutMetricsErrorCodeMetricLimitExceeded is a PutMetricsErrorCode enum value
	PutMetricsErrorCodeMetricLimitExceeded = "METRIC_LIMIT_EXCEEDED"

	// PutMetricsErrorCodeInternalError is a PutMetricsErrorCode enum value
	PutMetricsErrorCodeInternalError = "INTERNAL_ERROR"

	// PutMetricsErrorCodeValidationError is a PutMetricsErrorCode enum value
	PutMetricsErrorCodeValidationError = "VALIDATION_ERROR"

	// PutMetricsErrorCodeConflictError is a PutMetricsErrorCode enum value
	PutMetricsErrorCodeConflictError = "CONFLICT_ERROR"
)
View Source
const (
	ServiceName = "SageMaker Metrics" // Name of service.
	EndpointsID = "metrics.sagemaker" // ID to lookup a service endpoint with.
	ServiceID   = "SageMaker Metrics" // ServiceID is a unique identifier of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

func PutMetricsErrorCode_Values

func PutMetricsErrorCode_Values() []string

PutMetricsErrorCode_Values returns all elements of the PutMetricsErrorCode enum

Types

type BatchPutMetricsError

type BatchPutMetricsError struct {

	// The error code of an error that occured when attempting to put metrics.
	//
	//    * METRIC_LIMIT_EXCEEDED: The maximum amount of metrics per resource is
	//    exceeded.
	//
	//    * INTERNAL_ERROR: An internal error occured.
	//
	//    * VALIDATION_ERROR: The metric data failed validation.
	//
	//    * CONFLICT_ERROR: Multiple requests attempted to modify the same data
	//    simultaneously.
	Code *string `type:"string" enum:"PutMetricsErrorCode"`

	// An index that corresponds to the metric in the request.
	MetricIndex *int64 `type:"integer"`
	// contains filtered or unexported fields
}

An error that occured when putting the metric data.

func (BatchPutMetricsError) GoString

func (s BatchPutMetricsError) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*BatchPutMetricsError) SetCode

SetCode sets the Code field's value.

func (*BatchPutMetricsError) SetMetricIndex

func (s *BatchPutMetricsError) SetMetricIndex(v int64) *BatchPutMetricsError

SetMetricIndex sets the MetricIndex field's value.

func (BatchPutMetricsError) String

func (s BatchPutMetricsError) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type BatchPutMetricsInput

type BatchPutMetricsInput struct {

	// A list of raw metric values to put.
	//
	// MetricData is a required field
	MetricData []*RawMetricData `min:"1" type:"list" required:"true"`

	// The name of the Trial Component to associate with the metrics.
	//
	// TrialComponentName is a required field
	TrialComponentName *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (BatchPutMetricsInput) GoString

func (s BatchPutMetricsInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*BatchPutMetricsInput) SetMetricData

SetMetricData sets the MetricData field's value.

func (*BatchPutMetricsInput) SetTrialComponentName

func (s *BatchPutMetricsInput) SetTrialComponentName(v string) *BatchPutMetricsInput

SetTrialComponentName sets the TrialComponentName field's value.

func (BatchPutMetricsInput) String

func (s BatchPutMetricsInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*BatchPutMetricsInput) Validate

func (s *BatchPutMetricsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type BatchPutMetricsOutput

type BatchPutMetricsOutput struct {

	// Lists any errors that occur when inserting metric data.
	Errors []*BatchPutMetricsError `min:"1" type:"list"`
	// contains filtered or unexported fields
}

func (BatchPutMetricsOutput) GoString

func (s BatchPutMetricsOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*BatchPutMetricsOutput) SetErrors

SetErrors sets the Errors field's value.

func (BatchPutMetricsOutput) String

func (s BatchPutMetricsOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type RawMetricData

type RawMetricData struct {

	// The name of the metric.
	//
	// MetricName is a required field
	MetricName *string `min:"1" type:"string" required:"true"`

	// The metric step (epoch).
	Step *int64 `type:"integer"`

	// The time that the metric was recorded.
	//
	// Timestamp is a required field
	Timestamp *time.Time `type:"timestamp" required:"true"`

	// The metric value.
	//
	// Value is a required field
	Value *float64 `type:"double" required:"true"`
	// contains filtered or unexported fields
}

The raw metric data to associate with the resource.

func (RawMetricData) GoString

func (s RawMetricData) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*RawMetricData) SetMetricName

func (s *RawMetricData) SetMetricName(v string) *RawMetricData

SetMetricName sets the MetricName field's value.

func (*RawMetricData) SetStep

func (s *RawMetricData) SetStep(v int64) *RawMetricData

SetStep sets the Step field's value.

func (*RawMetricData) SetTimestamp

func (s *RawMetricData) SetTimestamp(v time.Time) *RawMetricData

SetTimestamp sets the Timestamp field's value.

func (*RawMetricData) SetValue

func (s *RawMetricData) SetValue(v float64) *RawMetricData

SetValue sets the Value field's value.

func (RawMetricData) String

func (s RawMetricData) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*RawMetricData) Validate

func (s *RawMetricData) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type SageMakerMetrics

type SageMakerMetrics struct {
	*client.Client
}

SageMakerMetrics provides the API operation methods for making requests to Amazon SageMaker Metrics Service. See this package's package overview docs for details on the service.

SageMakerMetrics methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

New creates a new instance of the SageMakerMetrics client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

mySession := session.Must(session.NewSession())

// Create a SageMakerMetrics client from just a session.
svc := sagemakermetrics.New(mySession)

// Create a SageMakerMetrics client with additional configuration
svc := sagemakermetrics.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*SageMakerMetrics) BatchPutMetrics

func (c *SageMakerMetrics) BatchPutMetrics(input *BatchPutMetricsInput) (*BatchPutMetricsOutput, error)

BatchPutMetrics API operation for Amazon SageMaker Metrics Service.

Used to ingest training metrics into SageMaker. These metrics can be visualized in SageMaker Studio and retrieved with the GetMetrics API.

Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.

See the AWS API reference guide for Amazon SageMaker Metrics Service's API operation BatchPutMetrics for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30/BatchPutMetrics

func (*SageMakerMetrics) BatchPutMetricsRequest

func (c *SageMakerMetrics) BatchPutMetricsRequest(input *BatchPutMetricsInput) (req *request.Request, output *BatchPutMetricsOutput)

BatchPutMetricsRequest generates a "aws/request.Request" representing the client's request for the BatchPutMetrics operation. The "output" return value will be populated with the request's response once the request completes successfully.

Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.

See BatchPutMetrics for more information on using the BatchPutMetrics API call, and error handling.

This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.

// Example sending a request using the BatchPutMetricsRequest method.
req, resp := client.BatchPutMetricsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30/BatchPutMetrics

func (*SageMakerMetrics) BatchPutMetricsWithContext

func (c *SageMakerMetrics) BatchPutMetricsWithContext(ctx aws.Context, input *BatchPutMetricsInput, opts ...request.Option) (*BatchPutMetricsOutput, error)

BatchPutMetricsWithContext is the same as BatchPutMetrics with the addition of the ability to pass a context and additional request options.

See BatchPutMetrics for details on how to use this API operation.

The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.

Directories

Path Synopsis
Package sagemakermetricsiface provides an interface to enable mocking the Amazon SageMaker Metrics Service service client for testing your code.
Package sagemakermetricsiface provides an interface to enable mocking the Amazon SageMaker Metrics Service service client for testing your code.

Jump to

Keyboard shortcuts

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