Table of Contents
SageMakerMetrics.
Client
¶A low-level client representing 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.
import boto3
client = boto3.client('sagemaker-metrics')
These are the available methods:
batch_put_metrics
(**kwargs)¶Used to ingest training metrics into SageMaker. These metrics can be visualized in SageMaker Studio and retrieved with the GetMetrics
API.
See also: AWS API Documentation
Request Syntax
response = client.batch_put_metrics(
TrialComponentName='string',
MetricData=[
{
'MetricName': 'string',
'Timestamp': datetime(2015, 1, 1),
'Step': 123,
'Value': 123.0
},
]
)
[REQUIRED]
The name of the Trial Component to associate with the metrics.
[REQUIRED]
A list of raw metric values to put.
The raw metric data to associate with the resource.
The name of the metric.
The time that the metric was recorded.
The metric step (epoch).
The metric value.
dict
Response Syntax
{
'Errors': [
{
'Code': 'METRIC_LIMIT_EXCEEDED'|'INTERNAL_ERROR'|'VALIDATION_ERROR'|'CONFLICT_ERROR',
'MetricIndex': 123
},
]
}
Response Structure
(dict) --
Errors (list) --
Lists any errors that occur when inserting metric data.
(dict) --
An error that occured when putting the metric data.
Code (string) --
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.MetricIndex (integer) --
An index that corresponds to the metric in the request.
can_paginate
(operation_name)¶Check if an operation can be paginated.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.True
if the operation can be paginated,
False
otherwise.close
()¶Closes underlying endpoint connections.
get_paginator
(operation_name)¶Create a paginator for an operation.
create_foo
, and you'd normally invoke the
operation as client.create_foo(**kwargs)
, if the
create_foo
operation can be paginated, you can use the
call client.get_paginator("create_foo")
.client.can_paginate
method to
check if an operation is pageable.get_waiter
(waiter_name)¶Returns an object that can wait for some condition.
The available paginators are: