clientwrapper

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DescribeTrainingJob404Code          = "ValidationException"
	DescribeTrainingJob404MessagePrefix = "Requested resource not found"
	StopTrainingJob404Code              = "ValidationException"
	StopTrainingJob404MessagePrefix     = "Requested resource not found"

	DescribeHyperParameterTuningJob404Code          = "ResourceNotFound"
	DescribeHyperParameterTuningJob404MessagePrefix = "Amazon SageMaker can't find a tuning job"
	StopHyperParameterTuningJob404Code              = "ResourceNotFound"
	StopHyperParameterTuningJob404MessagePrefix     = "Amazon SageMaker can't find a tuning job"

	DeleteEndpoint404MessagePrefix                        = "Could not find endpoint"
	DeleteEndpoint404Code                                 = "ValidationException"
	DeleteEndpointInProgressMessagePrefix                 = "Cannot update in-progress endpoint"
	DeleteEndpointInProgressCode                          = "ValidationException"
	DescribeEndpoint404MessagePrefix                      = "Could not find endpoint"
	DescribeEndpoint404Code                               = "ValidationException"
	UpdateEndpoint404MessagePrefix                        = "Could not find endpoint"
	UpdateEndpoint404Code                                 = "ValidationException"
	UpdateEndpointUnableToFindEndpointConfigMessagePrefix = "Could not find endpoint configuration"
	UpdateEndpointUnableToFindEndpointConfigCode          = "ValidationException"

	DescribeEndpointConfig404MessagePrefix = "Could not find endpoint configuration"
	DescribeEndpointConfig404Code          = "ValidationException"
	DeleteEndpointConfig404MessagePrefix   = "Could not find endpoint configuration"
	DeleteEndpointConfig404Code            = "ValidationException"

	DescribeModel404MessagePrefix = "Could not find model"
	DescribeModel404Code          = "ValidationException"
	DeleteModel404MessagePrefix   = "Could not find model"
	DeleteModel404Code            = "ValidationException"
)

Provides the prefixes and error codes relating to each endpoint

Variables

This section is empty.

Functions

func IsDeleteEndpoint404Error

func IsDeleteEndpoint404Error(err error) bool

IsDeleteEndpoint404Error determines whether the given error is equivalent to an HTTP 404 status code.

func IsDeleteEndpointConfig404Error

func IsDeleteEndpointConfig404Error(err error) bool

IsDeleteEndpointConfig404Error determines whether the given error is equivalent to an HTTP 404 status code.

func IsDeleteModel404Error

func IsDeleteModel404Error(err error) bool

IsDeleteModel404Error determines whether the given error is equivalent to an HTTP 404 status code.

func IsStopHyperParameterTuningJob404Error

func IsStopHyperParameterTuningJob404Error(err error) bool

IsStopHyperParameterTuningJob404Error determines whether the given error is equivalent to an HTTP 404 status code.

func IsStopTrainingJob404Error

func IsStopTrainingJob404Error(err error) bool

IsStopTrainingJob404Error determines whether the given error is equivalent to an HTTP 404 status code.

func IsUpdateEndpoint404Error

func IsUpdateEndpoint404Error(err error) bool

IsUpdateEndpoint404Error determines whether the given error is equivalent to an HTTP 404 status code.

Types

type HyperParameterTuningJobPaginator

type HyperParameterTuningJobPaginator interface {
	Next(context.Context) bool
	CurrentPage() []sagemaker.HyperParameterTrainingJobSummary
	Err() error
}

HyperParameterTuningJobPaginator wraps the SageMaker ListTrainingJobsForHyperParameterTuningJobPaginator.

type SageMakerClientWrapper

type SageMakerClientWrapper interface {
	DescribeTrainingJob(ctx context.Context, trainingJobName string) (*sagemaker.DescribeTrainingJobOutput, error)
	CreateTrainingJob(ctx context.Context, trainingJob *sagemaker.CreateTrainingJobInput) (*sagemaker.CreateTrainingJobOutput, error)
	StopTrainingJob(ctx context.Context, trainingJobName string) (*sagemaker.StopTrainingJobOutput, error)

	DescribeHyperParameterTuningJob(ctx context.Context, tuningJobName string) (*sagemaker.DescribeHyperParameterTuningJobOutput, error)
	CreateHyperParameterTuningJob(ctx context.Context, tuningJob *sagemaker.CreateHyperParameterTuningJobInput) (*sagemaker.CreateHyperParameterTuningJobOutput, error)
	StopHyperParameterTuningJob(ctx context.Context, tuningJobName string) (*sagemaker.StopHyperParameterTuningJobOutput, error)

	ListTrainingJobsForHyperParameterTuningJob(ctx context.Context, tuningJobName string) HyperParameterTuningJobPaginator

	DescribeEndpoint(ctx context.Context, endpointName string) (*sagemaker.DescribeEndpointOutput, error)
	CreateEndpoint(ctx context.Context, endpoint *sagemaker.CreateEndpointInput) (*sagemaker.CreateEndpointOutput, error)
	DeleteEndpoint(ctx context.Context, endpointName *string) (*sagemaker.DeleteEndpointOutput, error)
	UpdateEndpoint(ctx context.Context, endpointName, endpointConfigName string) (*sagemaker.UpdateEndpointOutput, error)

	DescribeModel(ctx context.Context, modelName string) (*sagemaker.DescribeModelOutput, error)
	CreateModel(ctx context.Context, model *sagemaker.CreateModelInput) (*sagemaker.CreateModelOutput, error)
	DeleteModel(ctx context.Context, model *sagemaker.DeleteModelInput) (*sagemaker.DeleteModelOutput, error)

	DescribeEndpointConfig(ctx context.Context, endpointConfigName string) (*sagemaker.DescribeEndpointConfigOutput, error)
	CreateEndpointConfig(ctx context.Context, endpointConfig *sagemaker.CreateEndpointConfigInput) (*sagemaker.CreateEndpointConfigOutput, error)
	DeleteEndpointConfig(ctx context.Context, endpointConfig *sagemaker.DeleteEndpointConfigInput) (*sagemaker.DeleteEndpointConfigOutput, error)
}

SageMakerClientWrapper wraps the SageMaker client. "Not Found" errors are handled differently than in the Go SDK; here a method will return a nil pointer and a nil error if there is a 404. This simplifies code that interacts with SageMaker. Other errors are returned normally.

func NewSageMakerClientWrapper

func NewSageMakerClientWrapper(innerClient sagemakeriface.ClientAPI) SageMakerClientWrapper

NewSageMakerClientWrapper creates a SageMaker wrapper around an existing client.

type SageMakerClientWrapperProvider

type SageMakerClientWrapperProvider func(aws.Config) SageMakerClientWrapper

SageMakerClientWrapperProvider defines a function that returns a SageMaker client. Used for mocking.

Jump to

Keyboard shortcuts

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