SageMakerMetrics **************** Client ====== class 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. * BatchPutMetrics import boto3 client = boto3.client('sagemaker-metrics') These are the available methods: * batch_get_metrics * batch_put_metrics * can_paginate * close * get_paginator * get_waiter SageMakerMetrics / Client / get_paginator get_paginator ************* SageMakerMetrics.Client.get_paginator(operation_name) Create a paginator for an operation. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "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")". Raises: **OperationNotPageableError** -- Raised if the operation is not pageable. You can use the "client.can_paginate" method to check if an operation is pageable. Return type: "botocore.paginate.Paginator" Returns: A paginator object. SageMakerMetrics / Client / can_paginate can_paginate ************ SageMakerMetrics.Client.can_paginate(operation_name) Check if an operation can be paginated. Parameters: **operation_name** (*string*) -- The operation name. This is the same name as the method name on the client. For example, if the method name is "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")". Returns: "True" if the operation can be paginated, "False" otherwise. SageMakerMetrics / Client / batch_put_metrics batch_put_metrics ***************** SageMakerMetrics.Client.batch_put_metrics(**kwargs) Used to ingest training metrics into SageMaker. These metrics can be visualized in SageMaker Studio. 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 }, ] ) Parameters: * **TrialComponentName** (*string*) -- **[REQUIRED]** The name of the Trial Component to associate with the metrics. The Trial Component name must be entirely lowercase. * **MetricData** (*list*) -- **[REQUIRED]** A list of raw metric values to put. * *(dict) --* The raw metric data to associate with the resource. * **MetricName** *(string) --* **[REQUIRED]** The name of the metric. * **Timestamp** *(datetime) --* **[REQUIRED]** The time that the metric was recorded. * **Step** *(integer) --* The metric step (epoch). * **Value** *(float) --* **[REQUIRED]** The metric value. Return type: dict Returns: **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. SageMakerMetrics / Client / get_waiter get_waiter ********** SageMakerMetrics.Client.get_waiter(waiter_name) Returns an object that can wait for some condition. Parameters: **waiter_name** (*str*) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters. Returns: The specified waiter object. Return type: "botocore.waiter.Waiter" SageMakerMetrics / Client / batch_get_metrics batch_get_metrics ***************** SageMakerMetrics.Client.batch_get_metrics(**kwargs) Used to retrieve training metrics from SageMaker. See also: AWS API Documentation **Request Syntax** response = client.batch_get_metrics( MetricQueries=[ { 'MetricName': 'string', 'ResourceArn': 'string', 'MetricStat': 'Min'|'Max'|'Avg'|'Count'|'StdDev'|'Last', 'Period': 'OneMinute'|'FiveMinute'|'OneHour'|'IterationNumber', 'XAxisType': 'IterationNumber'|'Timestamp', 'Start': 123, 'End': 123 }, ] ) Parameters: **MetricQueries** (*list*) -- **[REQUIRED]** Queries made to retrieve training metrics from SageMaker. * *(dict) --* Specifies a query to retrieve training metrics from SageMaker. * **MetricName** *(string) --* **[REQUIRED]** The name of the metric to retrieve. * **ResourceArn** *(string) --* **[REQUIRED]** The ARN of the SageMaker resource to retrieve metrics for. * **MetricStat** *(string) --* **[REQUIRED]** The metrics stat type of metrics to retrieve. * **Period** *(string) --* **[REQUIRED]** The time period of metrics to retrieve. * **XAxisType** *(string) --* **[REQUIRED]** The x-axis type of metrics to retrieve. * **Start** *(integer) --* The start time of metrics to retrieve. * **End** *(integer) --* The end time of metrics to retrieve. Return type: dict Returns: **Response Syntax** { 'MetricQueryResults': [ { 'Status': 'Complete'|'Truncated'|'InternalError'|'ValidationError', 'Message': 'string', 'XAxisValues': [ 123, ], 'MetricValues': [ 123.0, ] }, ] } **Response Structure** * *(dict) --* * **MetricQueryResults** *(list) --* The results of a query to retrieve training metrics from SageMaker. * *(dict) --* The result of a query to retrieve training metrics from SageMaker. * **Status** *(string) --* The status of the metric query. * **Message** *(string) --* A message describing the status of the metric query. * **XAxisValues** *(list) --* The values for the x-axis of the metrics. * *(integer) --* * **MetricValues** *(list) --* The metric values retrieved by the query. * *(float) --* SageMakerMetrics / Client / close close ***** SageMakerMetrics.Client.close() Closes underlying endpoint connections.