SDK for PHP 3.x

Client: Aws\SageMakerMetrics\SageMakerMetricsClient
Service ID: sagemaker-metrics
Version: 2022-09-30

This page describes the parameters and results for the operations of the Amazon SageMaker Metrics Service (2022-09-30), and shows how to use the Aws\SageMakerMetrics\SageMakerMetricsClient object to call the described operations. This documentation is specific to the 2022-09-30 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

BatchPutMetrics ( array $params = [] )
Used to ingest training metrics into SageMaker.

Operations

BatchPutMetrics

$result = $client->batchPutMetrics([/* ... */]);
$promise = $client->batchPutMetricsAsync([/* ... */]);

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

Parameter Syntax

$result = $client->batchPutMetrics([
    'MetricData' => [ // REQUIRED
        [
            'MetricName' => '<string>', // REQUIRED
            'Step' => <integer>,
            'Timestamp' => <integer || string || DateTime>, // REQUIRED
            'Value' => <float>, // REQUIRED
        ],
        // ...
    ],
    'TrialComponentName' => '<string>', // REQUIRED
]);

Parameter Details

Members
MetricData
Required: Yes
Type: Array of RawMetricData structures

A list of raw metric values to put.

TrialComponentName
Required: Yes
Type: string

The name of the Trial Component to associate with the metrics.

Result Syntax

[
    'Errors' => [
        [
            'Code' => 'METRIC_LIMIT_EXCEEDED|INTERNAL_ERROR|VALIDATION_ERROR|CONFLICT_ERROR',
            'MetricIndex' => <integer>,
        ],
        // ...
    ],
]

Result Details

Members
Errors
Type: Array of BatchPutMetricsError structures

Lists any errors that occur when inserting metric data.

Errors

There are no errors described for this operation.

Shapes

BatchPutMetricsError

Description

An error that occured when putting the metric data.

Members
Code
Type: 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
Type: int

An index that corresponds to the metric in the request.

RawMetricData

Description

The raw metric data to associate with the resource.

Members
MetricName
Required: Yes
Type: string

The name of the metric.

Step
Type: int

The metric step (epoch).

Timestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time that the metric was recorded.

Value
Required: Yes
Type: double

The metric value.