aws-sdk-sagemakermetrics 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/LICENSE.txt +202 -0
- data/VERSION +1 -0
- data/lib/aws-sdk-sagemakermetrics/client.rb +448 -0
- data/lib/aws-sdk-sagemakermetrics/client_api.rb +79 -0
- data/lib/aws-sdk-sagemakermetrics/customizations.rb +0 -0
- data/lib/aws-sdk-sagemakermetrics/endpoint_parameters.rb +69 -0
- data/lib/aws-sdk-sagemakermetrics/endpoint_provider.rb +110 -0
- data/lib/aws-sdk-sagemakermetrics/endpoints.rb +29 -0
- data/lib/aws-sdk-sagemakermetrics/errors.rb +38 -0
- data/lib/aws-sdk-sagemakermetrics/plugins/endpoints.rb +70 -0
- data/lib/aws-sdk-sagemakermetrics/resource.rb +26 -0
- data/lib/aws-sdk-sagemakermetrics/types.rb +103 -0
- data/lib/aws-sdk-sagemakermetrics.rb +57 -0
- metadata +94 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SageMakerMetrics
|
11
|
+
# @api private
|
12
|
+
module ClientApi
|
13
|
+
|
14
|
+
include Seahorse::Model
|
15
|
+
|
16
|
+
BatchPutMetricsError = Shapes::StructureShape.new(name: 'BatchPutMetricsError')
|
17
|
+
BatchPutMetricsErrorList = Shapes::ListShape.new(name: 'BatchPutMetricsErrorList')
|
18
|
+
BatchPutMetricsRequest = Shapes::StructureShape.new(name: 'BatchPutMetricsRequest')
|
19
|
+
BatchPutMetricsResponse = Shapes::StructureShape.new(name: 'BatchPutMetricsResponse')
|
20
|
+
Double = Shapes::FloatShape.new(name: 'Double')
|
21
|
+
ExperimentEntityName = Shapes::StringShape.new(name: 'ExperimentEntityName')
|
22
|
+
Integer = Shapes::IntegerShape.new(name: 'Integer')
|
23
|
+
MetricName = Shapes::StringShape.new(name: 'MetricName')
|
24
|
+
PutMetricsErrorCode = Shapes::StringShape.new(name: 'PutMetricsErrorCode')
|
25
|
+
RawMetricData = Shapes::StructureShape.new(name: 'RawMetricData')
|
26
|
+
RawMetricDataList = Shapes::ListShape.new(name: 'RawMetricDataList')
|
27
|
+
Step = Shapes::IntegerShape.new(name: 'Step')
|
28
|
+
Timestamp = Shapes::TimestampShape.new(name: 'Timestamp')
|
29
|
+
|
30
|
+
BatchPutMetricsError.add_member(:code, Shapes::ShapeRef.new(shape: PutMetricsErrorCode, location_name: "Code"))
|
31
|
+
BatchPutMetricsError.add_member(:metric_index, Shapes::ShapeRef.new(shape: Integer, location_name: "MetricIndex"))
|
32
|
+
BatchPutMetricsError.struct_class = Types::BatchPutMetricsError
|
33
|
+
|
34
|
+
BatchPutMetricsErrorList.member = Shapes::ShapeRef.new(shape: BatchPutMetricsError)
|
35
|
+
|
36
|
+
BatchPutMetricsRequest.add_member(:trial_component_name, Shapes::ShapeRef.new(shape: ExperimentEntityName, required: true, location_name: "TrialComponentName"))
|
37
|
+
BatchPutMetricsRequest.add_member(:metric_data, Shapes::ShapeRef.new(shape: RawMetricDataList, required: true, location_name: "MetricData"))
|
38
|
+
BatchPutMetricsRequest.struct_class = Types::BatchPutMetricsRequest
|
39
|
+
|
40
|
+
BatchPutMetricsResponse.add_member(:errors, Shapes::ShapeRef.new(shape: BatchPutMetricsErrorList, location_name: "Errors"))
|
41
|
+
BatchPutMetricsResponse.struct_class = Types::BatchPutMetricsResponse
|
42
|
+
|
43
|
+
RawMetricData.add_member(:metric_name, Shapes::ShapeRef.new(shape: MetricName, required: true, location_name: "MetricName"))
|
44
|
+
RawMetricData.add_member(:timestamp, Shapes::ShapeRef.new(shape: Timestamp, required: true, location_name: "Timestamp"))
|
45
|
+
RawMetricData.add_member(:step, Shapes::ShapeRef.new(shape: Step, location_name: "Step"))
|
46
|
+
RawMetricData.add_member(:value, Shapes::ShapeRef.new(shape: Double, required: true, location_name: "Value"))
|
47
|
+
RawMetricData.struct_class = Types::RawMetricData
|
48
|
+
|
49
|
+
RawMetricDataList.member = Shapes::ShapeRef.new(shape: RawMetricData)
|
50
|
+
|
51
|
+
|
52
|
+
# @api private
|
53
|
+
API = Seahorse::Model::Api.new.tap do |api|
|
54
|
+
|
55
|
+
api.version = "2022-09-30"
|
56
|
+
|
57
|
+
api.metadata = {
|
58
|
+
"apiVersion" => "2022-09-30",
|
59
|
+
"endpointPrefix" => "metrics.sagemaker",
|
60
|
+
"protocol" => "rest-json",
|
61
|
+
"serviceAbbreviation" => "SageMaker Metrics",
|
62
|
+
"serviceFullName" => "Amazon SageMaker Metrics Service",
|
63
|
+
"serviceId" => "SageMaker Metrics",
|
64
|
+
"signatureVersion" => "v4",
|
65
|
+
"signingName" => "sagemaker",
|
66
|
+
"uid" => "sagemaker-metrics-2022-09-30",
|
67
|
+
}
|
68
|
+
|
69
|
+
api.add_operation(:batch_put_metrics, Seahorse::Model::Operation.new.tap do |o|
|
70
|
+
o.name = "BatchPutMetrics"
|
71
|
+
o.http_method = "PUT"
|
72
|
+
o.http_request_uri = "/BatchPutMetrics"
|
73
|
+
o.input = Shapes::ShapeRef.new(shape: BatchPutMetricsRequest)
|
74
|
+
o.output = Shapes::ShapeRef.new(shape: BatchPutMetricsResponse)
|
75
|
+
end)
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
79
|
+
end
|
File without changes
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SageMakerMetrics
|
11
|
+
# Endpoint parameters used to influence endpoints per request.
|
12
|
+
#
|
13
|
+
# @!attribute region
|
14
|
+
# The AWS region used to dispatch the request.
|
15
|
+
#
|
16
|
+
# @return [String]
|
17
|
+
#
|
18
|
+
# @!attribute use_dual_stack
|
19
|
+
# When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
|
20
|
+
#
|
21
|
+
# @return [Boolean]
|
22
|
+
#
|
23
|
+
# @!attribute use_fips
|
24
|
+
# When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
|
25
|
+
#
|
26
|
+
# @return [Boolean]
|
27
|
+
#
|
28
|
+
# @!attribute endpoint
|
29
|
+
# Override the endpoint used to send this request
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
#
|
33
|
+
EndpointParameters = Struct.new(
|
34
|
+
:region,
|
35
|
+
:use_dual_stack,
|
36
|
+
:use_fips,
|
37
|
+
:endpoint,
|
38
|
+
) do
|
39
|
+
include Aws::Structure
|
40
|
+
|
41
|
+
# @api private
|
42
|
+
class << self
|
43
|
+
PARAM_MAP = {
|
44
|
+
'Region' => :region,
|
45
|
+
'UseDualStack' => :use_dual_stack,
|
46
|
+
'UseFIPS' => :use_fips,
|
47
|
+
'Endpoint' => :endpoint,
|
48
|
+
}.freeze
|
49
|
+
end
|
50
|
+
|
51
|
+
def initialize(options = {})
|
52
|
+
self[:region] = options[:region]
|
53
|
+
if self[:region].nil?
|
54
|
+
raise ArgumentError, "Missing required EndpointParameter: :region"
|
55
|
+
end
|
56
|
+
self[:use_dual_stack] = options[:use_dual_stack]
|
57
|
+
self[:use_dual_stack] = false if self[:use_dual_stack].nil?
|
58
|
+
if self[:use_dual_stack].nil?
|
59
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
|
60
|
+
end
|
61
|
+
self[:use_fips] = options[:use_fips]
|
62
|
+
self[:use_fips] = false if self[:use_fips].nil?
|
63
|
+
if self[:use_fips].nil?
|
64
|
+
raise ArgumentError, "Missing required EndpointParameter: :use_fips"
|
65
|
+
end
|
66
|
+
self[:endpoint] = options[:endpoint]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,110 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SageMakerMetrics
|
11
|
+
class EndpointProvider
|
12
|
+
def initialize(rule_set = nil)
|
13
|
+
@@rule_set ||= begin
|
14
|
+
endpoint_rules = Aws::Json.load(Base64.decode64(RULES))
|
15
|
+
Aws::Endpoints::RuleSet.new(
|
16
|
+
version: endpoint_rules['version'],
|
17
|
+
service_id: endpoint_rules['serviceId'],
|
18
|
+
parameters: endpoint_rules['parameters'],
|
19
|
+
rules: endpoint_rules['rules']
|
20
|
+
)
|
21
|
+
end
|
22
|
+
@provider = Aws::Endpoints::RulesProvider.new(rule_set || @@rule_set)
|
23
|
+
end
|
24
|
+
|
25
|
+
def resolve_endpoint(parameters)
|
26
|
+
@provider.resolve_endpoint(parameters)
|
27
|
+
end
|
28
|
+
|
29
|
+
# @api private
|
30
|
+
RULES = <<-JSON
|
31
|
+
eyJ2ZXJzaW9uIjoiMS4wIiwicGFyYW1ldGVycyI6eyJSZWdpb24iOnsiYnVp
|
32
|
+
bHRJbiI6IkFXUzo6UmVnaW9uIiwicmVxdWlyZWQiOnRydWUsImRvY3VtZW50
|
33
|
+
YXRpb24iOiJUaGUgQVdTIHJlZ2lvbiB1c2VkIHRvIGRpc3BhdGNoIHRoZSBy
|
34
|
+
ZXF1ZXN0LiIsInR5cGUiOiJTdHJpbmcifSwiVXNlRHVhbF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N1
|
96
|
+
cHBvcnRzRHVhbFN0YWNrIl19XX1dLCJ0eXBlIjoidHJlZSIsInJ1bGVzIjpb
|
97
|
+
eyJjb25kaXRpb25zIjpbXSwiZW5kcG9pbnQiOnsidXJsIjoiaHR0cHM6Ly9t
|
98
|
+
ZXRyaWNzLnNhZ2VtYWtlci57UmVnaW9ufS57UGFydGl0aW9uUmVzdWx0I2R1
|
99
|
+
YWxTdGFja0Ruc1N1ZmZpeH0iLCJwcm9wZXJ0aWVzIjp7fSwiaGVhZGVycyI6
|
100
|
+
e319LCJ0eXBlIjoiZW5kcG9pbnQifV19LHsiY29uZGl0aW9ucyI6W10sImVy
|
101
|
+
cm9yIjoiRHVhbFN0YWNrIGlzIGVuYWJsZWQgYnV0IHRoaXMgcGFydGl0aW9u
|
102
|
+
IGRvZXMgbm90IHN1cHBvcnQgRHVhbFN0YWNrIiwidHlwZSI6ImVycm9yIn1d
|
103
|
+
fSx7ImNvbmRpdGlvbnMiOltdLCJlbmRwb2ludCI6eyJ1cmwiOiJodHRwczov
|
104
|
+
L21ldHJpY3Muc2FnZW1ha2VyLntSZWdpb259LntQYXJ0aXRpb25SZXN1bHQj
|
105
|
+
ZG5zU3VmZml4fSIsInByb3BlcnRpZXMiOnt9LCJoZWFkZXJzIjp7fX0sInR5
|
106
|
+
cGUiOiJlbmRwb2ludCJ9XX1dfQ==
|
107
|
+
|
108
|
+
JSON
|
109
|
+
end
|
110
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::SageMakerMetrics
|
12
|
+
module Endpoints
|
13
|
+
|
14
|
+
class BatchPutMetrics
|
15
|
+
def self.build(context)
|
16
|
+
unless context.config.regional_endpoint
|
17
|
+
endpoint = context.config.endpoint.to_s
|
18
|
+
end
|
19
|
+
Aws::SageMakerMetrics::EndpointParameters.new(
|
20
|
+
region: context.config.region,
|
21
|
+
use_dual_stack: context.config.use_dualstack_endpoint,
|
22
|
+
use_fips: context.config.use_fips_endpoint,
|
23
|
+
endpoint: endpoint,
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SageMakerMetrics
|
11
|
+
|
12
|
+
# When SageMakerMetrics returns an error response, the Ruby SDK constructs and raises an error.
|
13
|
+
# These errors all extend Aws::SageMakerMetrics::Errors::ServiceError < {Aws::Errors::ServiceError}
|
14
|
+
#
|
15
|
+
# You can rescue all SageMakerMetrics errors using ServiceError:
|
16
|
+
#
|
17
|
+
# begin
|
18
|
+
# # do stuff
|
19
|
+
# rescue Aws::SageMakerMetrics::Errors::ServiceError
|
20
|
+
# # rescues all SageMakerMetrics API errors
|
21
|
+
# end
|
22
|
+
#
|
23
|
+
#
|
24
|
+
# ## Request Context
|
25
|
+
# ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns
|
26
|
+
# information about the request that generated the error.
|
27
|
+
# See {Seahorse::Client::RequestContext} for more information.
|
28
|
+
#
|
29
|
+
# ## Error Classes
|
30
|
+
#
|
31
|
+
# Additionally, error classes are dynamically generated for service errors based on the error code
|
32
|
+
# if they are not defined above.
|
33
|
+
module Errors
|
34
|
+
|
35
|
+
extend Aws::Errors::DynamicErrors
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
module Aws::SageMakerMetrics
|
12
|
+
module Plugins
|
13
|
+
class Endpoints < Seahorse::Client::Plugin
|
14
|
+
option(
|
15
|
+
:endpoint_provider,
|
16
|
+
doc_type: 'Aws::SageMakerMetrics::EndpointProvider',
|
17
|
+
docstring: 'The endpoint provider used to resolve endpoints. Any '\
|
18
|
+
'object that responds to `#resolve_endpoint(parameters)` '\
|
19
|
+
'where `parameters` is a Struct similar to '\
|
20
|
+
'`Aws::SageMakerMetrics::EndpointParameters`'
|
21
|
+
) do |cfg|
|
22
|
+
Aws::SageMakerMetrics::EndpointProvider.new
|
23
|
+
end
|
24
|
+
|
25
|
+
# @api private
|
26
|
+
class Handler < Seahorse::Client::Handler
|
27
|
+
def call(context)
|
28
|
+
# If endpoint was discovered, do not resolve or apply the endpoint.
|
29
|
+
unless context[:discovered_endpoint]
|
30
|
+
params = parameters_for_operation(context)
|
31
|
+
endpoint = context.config.endpoint_provider.resolve_endpoint(params)
|
32
|
+
|
33
|
+
context.http_request.endpoint = endpoint.url
|
34
|
+
apply_endpoint_headers(context, endpoint.headers)
|
35
|
+
end
|
36
|
+
|
37
|
+
context[:endpoint_params] = params
|
38
|
+
context[:auth_scheme] =
|
39
|
+
Aws::Endpoints.resolve_auth_scheme(context, endpoint)
|
40
|
+
|
41
|
+
@handler.call(context)
|
42
|
+
end
|
43
|
+
|
44
|
+
private
|
45
|
+
|
46
|
+
def apply_endpoint_headers(context, headers)
|
47
|
+
headers.each do |key, values|
|
48
|
+
value = values
|
49
|
+
.compact
|
50
|
+
.map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
|
51
|
+
.join(',')
|
52
|
+
|
53
|
+
context.http_request.headers[key] = value
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def parameters_for_operation(context)
|
58
|
+
case context.operation_name
|
59
|
+
when :batch_put_metrics
|
60
|
+
Aws::SageMakerMetrics::Endpoints::BatchPutMetrics.build(context)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def add_handlers(handlers, _config)
|
66
|
+
handlers.add(Handler, step: :build, priority: 75)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SageMakerMetrics
|
11
|
+
|
12
|
+
class Resource
|
13
|
+
|
14
|
+
# @param options ({})
|
15
|
+
# @option options [Client] :client
|
16
|
+
def initialize(options = {})
|
17
|
+
@client = options[:client] || Client.new(options)
|
18
|
+
end
|
19
|
+
|
20
|
+
# @return [Client]
|
21
|
+
def client
|
22
|
+
@client
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
module Aws::SageMakerMetrics
|
11
|
+
module Types
|
12
|
+
|
13
|
+
# An error that occured when putting the metric data.
|
14
|
+
#
|
15
|
+
# @!attribute [rw] code
|
16
|
+
# The error code of an error that occured when attempting to put
|
17
|
+
# metrics.
|
18
|
+
#
|
19
|
+
# * `METRIC_LIMIT_EXCEEDED` - The max amount of metrics per resource
|
20
|
+
# has been exceeded.
|
21
|
+
#
|
22
|
+
# * `INTERNAL_ERROR` - An internal error occured.
|
23
|
+
#
|
24
|
+
# * `VALIDATION_ERROR` - The metric data failed validation.
|
25
|
+
#
|
26
|
+
# * `CONFLICT_ERROR` - Multiple requests attempted to modify the same
|
27
|
+
# data simultaneously.
|
28
|
+
# @return [String]
|
29
|
+
#
|
30
|
+
# @!attribute [rw] metric_index
|
31
|
+
# An index that corresponds to the metric in the request.
|
32
|
+
# @return [Integer]
|
33
|
+
#
|
34
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30/BatchPutMetricsError AWS API Documentation
|
35
|
+
#
|
36
|
+
class BatchPutMetricsError < Struct.new(
|
37
|
+
:code,
|
38
|
+
:metric_index)
|
39
|
+
SENSITIVE = []
|
40
|
+
include Aws::Structure
|
41
|
+
end
|
42
|
+
|
43
|
+
# @!attribute [rw] trial_component_name
|
44
|
+
# The name of Trial Component to associate the metrics with.
|
45
|
+
# @return [String]
|
46
|
+
#
|
47
|
+
# @!attribute [rw] metric_data
|
48
|
+
# A list of raw metric values to put.
|
49
|
+
# @return [Array<Types::RawMetricData>]
|
50
|
+
#
|
51
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30/BatchPutMetricsRequest AWS API Documentation
|
52
|
+
#
|
53
|
+
class BatchPutMetricsRequest < Struct.new(
|
54
|
+
:trial_component_name,
|
55
|
+
:metric_data)
|
56
|
+
SENSITIVE = []
|
57
|
+
include Aws::Structure
|
58
|
+
end
|
59
|
+
|
60
|
+
# @!attribute [rw] errors
|
61
|
+
# Any errors that occur when inserting metric data will appear in
|
62
|
+
# this.
|
63
|
+
# @return [Array<Types::BatchPutMetricsError>]
|
64
|
+
#
|
65
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30/BatchPutMetricsResponse AWS API Documentation
|
66
|
+
#
|
67
|
+
class BatchPutMetricsResponse < Struct.new(
|
68
|
+
:errors)
|
69
|
+
SENSITIVE = []
|
70
|
+
include Aws::Structure
|
71
|
+
end
|
72
|
+
|
73
|
+
# The raw metric data to associate with the resource.
|
74
|
+
#
|
75
|
+
# @!attribute [rw] metric_name
|
76
|
+
# The name of the metric.
|
77
|
+
# @return [String]
|
78
|
+
#
|
79
|
+
# @!attribute [rw] timestamp
|
80
|
+
# The time when the metric was recorded.
|
81
|
+
# @return [Time]
|
82
|
+
#
|
83
|
+
# @!attribute [rw] step
|
84
|
+
# Metric step (aka Epoch).
|
85
|
+
# @return [Integer]
|
86
|
+
#
|
87
|
+
# @!attribute [rw] value
|
88
|
+
# The metric value.
|
89
|
+
# @return [Float]
|
90
|
+
#
|
91
|
+
# @see http://docs.aws.amazon.com/goto/WebAPI/sagemaker-metrics-2022-09-30/RawMetricData AWS API Documentation
|
92
|
+
#
|
93
|
+
class RawMetricData < Struct.new(
|
94
|
+
:metric_name,
|
95
|
+
:timestamp,
|
96
|
+
:step,
|
97
|
+
:value)
|
98
|
+
SENSITIVE = []
|
99
|
+
include Aws::Structure
|
100
|
+
end
|
101
|
+
|
102
|
+
end
|
103
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# WARNING ABOUT GENERATED CODE
|
4
|
+
#
|
5
|
+
# This file is generated. See the contributing guide for more information:
|
6
|
+
# https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
|
7
|
+
#
|
8
|
+
# WARNING ABOUT GENERATED CODE
|
9
|
+
|
10
|
+
|
11
|
+
require 'aws-sdk-core'
|
12
|
+
require 'aws-sigv4'
|
13
|
+
|
14
|
+
require_relative 'aws-sdk-sagemakermetrics/types'
|
15
|
+
require_relative 'aws-sdk-sagemakermetrics/client_api'
|
16
|
+
require_relative 'aws-sdk-sagemakermetrics/plugins/endpoints.rb'
|
17
|
+
require_relative 'aws-sdk-sagemakermetrics/client'
|
18
|
+
require_relative 'aws-sdk-sagemakermetrics/errors'
|
19
|
+
require_relative 'aws-sdk-sagemakermetrics/resource'
|
20
|
+
require_relative 'aws-sdk-sagemakermetrics/endpoint_parameters'
|
21
|
+
require_relative 'aws-sdk-sagemakermetrics/endpoint_provider'
|
22
|
+
require_relative 'aws-sdk-sagemakermetrics/endpoints'
|
23
|
+
require_relative 'aws-sdk-sagemakermetrics/customizations'
|
24
|
+
|
25
|
+
# This module provides support for Amazon SageMaker Metrics Service. This module is available in the
|
26
|
+
# `aws-sdk-sagemakermetrics` gem.
|
27
|
+
#
|
28
|
+
# # Client
|
29
|
+
#
|
30
|
+
# The {Client} class provides one method for each API operation. Operation
|
31
|
+
# methods each accept a hash of request parameters and return a response
|
32
|
+
# structure.
|
33
|
+
#
|
34
|
+
# sage_maker_metrics = Aws::SageMakerMetrics::Client.new
|
35
|
+
# resp = sage_maker_metrics.batch_put_metrics(params)
|
36
|
+
#
|
37
|
+
# See {Client} for more information.
|
38
|
+
#
|
39
|
+
# # Errors
|
40
|
+
#
|
41
|
+
# Errors returned from Amazon SageMaker Metrics Service are defined in the
|
42
|
+
# {Errors} module and all extend {Errors::ServiceError}.
|
43
|
+
#
|
44
|
+
# begin
|
45
|
+
# # do stuff
|
46
|
+
# rescue Aws::SageMakerMetrics::Errors::ServiceError
|
47
|
+
# # rescues all Amazon SageMaker Metrics Service API errors
|
48
|
+
# end
|
49
|
+
#
|
50
|
+
# See {Errors} for more information.
|
51
|
+
#
|
52
|
+
# @!group service
|
53
|
+
module Aws::SageMakerMetrics
|
54
|
+
|
55
|
+
GEM_VERSION = '1.0.0'
|
56
|
+
|
57
|
+
end
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: aws-sdk-sagemakermetrics
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Amazon Web Services
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: aws-sdk-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.165.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 3.165.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: aws-sigv4
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.1'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '1.1'
|
47
|
+
description: Official AWS Ruby gem for Amazon SageMaker Metrics Service (SageMaker
|
48
|
+
Metrics). This gem is part of the AWS SDK for Ruby.
|
49
|
+
email:
|
50
|
+
- aws-dr-rubygems@amazon.com
|
51
|
+
executables: []
|
52
|
+
extensions: []
|
53
|
+
extra_rdoc_files: []
|
54
|
+
files:
|
55
|
+
- CHANGELOG.md
|
56
|
+
- LICENSE.txt
|
57
|
+
- VERSION
|
58
|
+
- lib/aws-sdk-sagemakermetrics.rb
|
59
|
+
- lib/aws-sdk-sagemakermetrics/client.rb
|
60
|
+
- lib/aws-sdk-sagemakermetrics/client_api.rb
|
61
|
+
- lib/aws-sdk-sagemakermetrics/customizations.rb
|
62
|
+
- lib/aws-sdk-sagemakermetrics/endpoint_parameters.rb
|
63
|
+
- lib/aws-sdk-sagemakermetrics/endpoint_provider.rb
|
64
|
+
- lib/aws-sdk-sagemakermetrics/endpoints.rb
|
65
|
+
- lib/aws-sdk-sagemakermetrics/errors.rb
|
66
|
+
- lib/aws-sdk-sagemakermetrics/plugins/endpoints.rb
|
67
|
+
- lib/aws-sdk-sagemakermetrics/resource.rb
|
68
|
+
- lib/aws-sdk-sagemakermetrics/types.rb
|
69
|
+
homepage: https://github.com/aws/aws-sdk-ruby
|
70
|
+
licenses:
|
71
|
+
- Apache-2.0
|
72
|
+
metadata:
|
73
|
+
source_code_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-sagemakermetrics
|
74
|
+
changelog_uri: https://github.com/aws/aws-sdk-ruby/tree/version-3/gems/aws-sdk-sagemakermetrics/CHANGELOG.md
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '2.3'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubygems_version: 3.1.6
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: AWS SDK for Ruby - SageMaker Metrics
|
94
|
+
test_files: []
|