Amazon SageMaker Metrics Service 2022-09-30
- 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 */)
.
- BatchGetMetrics ( array $params = [] )
- Used to retrieve training metrics from SageMaker.
- BatchPutMetrics ( array $params = [] )
- Used to ingest training metrics into SageMaker.
Operations
BatchGetMetrics
$result = $client->batchGetMetrics
([/* ... */]); $promise = $client->batchGetMetricsAsync
([/* ... */]);
Used to retrieve training metrics from SageMaker.
Parameter Syntax
$result = $client->batchGetMetrics([ 'MetricQueries' => [ // REQUIRED [ 'End' => <integer>, 'MetricName' => '<string>', // REQUIRED 'MetricStat' => 'Min|Max|Avg|Count|StdDev|Last', // REQUIRED 'Period' => 'OneMinute|FiveMinute|OneHour|IterationNumber', // REQUIRED 'ResourceArn' => '<string>', // REQUIRED 'Start' => <integer>, 'XAxisType' => 'IterationNumber|Timestamp', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- MetricQueries
-
- Required: Yes
- Type: Array of MetricQuery structures
Queries made to retrieve training metrics from SageMaker.
Result Syntax
[ 'MetricQueryResults' => [ [ 'Message' => '<string>', 'MetricValues' => [<float>, ...], 'Status' => 'Complete|Truncated|InternalError|ValidationError', 'XAxisValues' => [<integer>, ...], ], // ... ], ]
Result Details
Members
- MetricQueryResults
-
- Type: Array of MetricQueryResult structures
The results of a query to retrieve training metrics from SageMaker.
Errors
There are no errors described for this operation.
BatchPutMetrics
$result = $client->batchPutMetrics
([/* ... */]); $promise = $client->batchPutMetricsAsync
([/* ... */]);
Used to ingest training metrics into SageMaker. These metrics can be visualized in SageMaker Studio.
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. The Trial Component name must be entirely lowercase.
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.
MetricQuery
Description
Specifies a query to retrieve training metrics from SageMaker.
Members
- End
-
- Type: long (int|float)
The end time of metrics to retrieve.
- MetricName
-
- Required: Yes
- Type: string
The name of the metric to retrieve.
- MetricStat
-
- Required: Yes
- Type: string
The metrics stat type of metrics to retrieve.
- Period
-
- Required: Yes
- Type: string
The time period of metrics to retrieve.
- ResourceArn
-
- Required: Yes
- Type: string
The ARN of the SageMaker resource to retrieve metrics for.
- Start
-
- Type: long (int|float)
The start time of metrics to retrieve.
- XAxisType
-
- Required: Yes
- Type: string
The x-axis type of metrics to retrieve.
MetricQueryResult
Description
The result of a query to retrieve training metrics from SageMaker.
Members
- Message
-
- Type: string
A message describing the status of the metric query.
- MetricValues
-
- Required: Yes
- Type: Array of doubles
The metric values retrieved by the query.
- Status
-
- Required: Yes
- Type: string
The status of the metric query.
- XAxisValues
-
- Required: Yes
- Type: Array of long (int|float)s
The values for the x-axis of the metrics.
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.