Amazon Sagemaker Edge Manager

2020/12/08 - Amazon Sagemaker Edge Manager - 2 new api methods

Changes  Update sagemaker client to latest version

SendHeartbeat (new) Link ¶

Use to get the current status of devices registered on SageMaker Edge Manager.

See also: AWS API Documentation

Request Syntax

client.send_heartbeat(
    AgentMetrics=[
        {
            'Dimension': 'string',
            'MetricName': 'string',
            'Value': 123.0,
            'Timestamp': datetime(2015, 1, 1)
        },
    ],
    Models=[
        {
            'ModelName': 'string',
            'ModelVersion': 'string',
            'LatestSampleTime': datetime(2015, 1, 1),
            'LatestInference': datetime(2015, 1, 1),
            'ModelMetrics': [
                {
                    'Dimension': 'string',
                    'MetricName': 'string',
                    'Value': 123.0,
                    'Timestamp': datetime(2015, 1, 1)
                },
            ]
        },
    ],
    AgentVersion='string',
    DeviceName='string',
    DeviceFleetName='string'
)
type AgentMetrics:

list

param AgentMetrics:

For internal use. Returns a list of SageMaker Edge Manager agent operating metrics.

  • (dict) --

    Information required for edge device metrics.

    • Dimension (string) --

      The dimension of metrics published.

    • MetricName (string) --

      Returns the name of the metric.

    • Value (float) --

      Returns the value of the metric.

    • Timestamp (datetime) --

      Timestamp of when the metric was requested.

type Models:

list

param Models:

Returns a list of models deployed on the the device.

  • (dict) --

    Information about a model deployed on an edge device that is registered with SageMaker Edge Manager.

    • ModelName (string) --

      The name of the model.

    • ModelVersion (string) --

      The version of the model.

    • LatestSampleTime (datetime) --

      The timestamp of the last data sample taken.

    • LatestInference (datetime) --

      The timestamp of the last inference that was made.

    • ModelMetrics (list) --

      Information required for model metrics.

      • (dict) --

        Information required for edge device metrics.

        • Dimension (string) --

          The dimension of metrics published.

        • MetricName (string) --

          Returns the name of the metric.

        • Value (float) --

          Returns the value of the metric.

        • Timestamp (datetime) --

          Timestamp of when the metric was requested.

type AgentVersion:

string

param AgentVersion:

[REQUIRED]

Returns the version of the agent.

type DeviceName:

string

param DeviceName:

[REQUIRED]

The unique name of the device.

type DeviceFleetName:

string

param DeviceFleetName:

[REQUIRED]

The name of the fleet that the device belongs to.

returns:

None

GetDeviceRegistration (new) Link ¶

Use to check if a device is registered with SageMaker Edge Manager.

See also: AWS API Documentation

Request Syntax

client.get_device_registration(
    DeviceName='string',
    DeviceFleetName='string'
)
type DeviceName:

string

param DeviceName:

[REQUIRED]

The unique name of the device you want to get the registration status from.

type DeviceFleetName:

string

param DeviceFleetName:

[REQUIRED]

The name of the fleet that the device belongs to.

rtype:

dict

returns:

Response Syntax

{
    'DeviceRegistration': 'string',
    'CacheTTL': 'string'
}

Response Structure

  • (dict) --

    • DeviceRegistration (string) --

      Describes if the device is currently registered with SageMaker Edge Manager.

    • CacheTTL (string) --

      The amount of time, in seconds, that the registration status is stored on the device’s cache before it is refreshed.