Amazon SageMaker Service

2018/07/05 - Amazon SageMaker Service - 3 updated api methods

Changes  Amazon SageMaker NotebookInstances supports 'Updating' as a NotebookInstanceStatus. In addition, DescribeEndpointOutput now includes Docker repository digest of deployed Model images.

DescribeEndpoint (updated) Link ¶
Changes (response)
{'ProductionVariants': {'DeployedImages': [{'ResolutionTime': 'timestamp',
                                            'ResolvedImage': 'string',
                                            'SpecifiedImage': 'string'}]}}

Returns the description of an endpoint.

See also: AWS API Documentation

Request Syntax

client.describe_endpoint(
    EndpointName='string'
)
type EndpointName

string

param EndpointName

[REQUIRED]

The name of the endpoint.

rtype

dict

returns

Response Syntax

{
    'EndpointName': 'string',
    'EndpointArn': 'string',
    'EndpointConfigName': 'string',
    'ProductionVariants': [
        {
            'VariantName': 'string',
            'DeployedImages': [
                {
                    'SpecifiedImage': 'string',
                    'ResolvedImage': 'string',
                    'ResolutionTime': datetime(2015, 1, 1)
                },
            ],
            'CurrentWeight': ...,
            'DesiredWeight': ...,
            'CurrentInstanceCount': 123,
            'DesiredInstanceCount': 123
        },
    ],
    'EndpointStatus': 'OutOfService'|'Creating'|'Updating'|'RollingBack'|'InService'|'Deleting'|'Failed',
    'FailureReason': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • EndpointName (string) --

      Name of the endpoint.

    • EndpointArn (string) --

      The Amazon Resource Name (ARN) of the endpoint.

    • EndpointConfigName (string) --

      The name of the endpoint configuration associated with this endpoint.

    • ProductionVariants (list) --

      An array of ProductionVariantSummary objects, one for each model hosted behind this endpoint.

      • (dict) --

        Describes weight and capacities for a production variant associated with an endpoint. If you sent a request to the UpdateEndpointWeightsAndCapacities API and the endpoint status is Updating , you get different desired and current values.

        • VariantName (string) --

          The name of the variant.

        • DeployedImages (list) --

          An array of DeployedImage objects that specify the Amazon EC2 Container Registry paths of the inference images deployed on instances of this ProductionVariant .

          • (dict) --

            Gets the Amazon EC2 Container Registry path of the docker image of the model that is hosted in this ProductionVariant.

            If you used the registry/repository[:tag] form to to specify the image path of the primary container when you created the model hosted in this ProductionVariant , the path resolves to a path of the form registry/repository[@digest] . A digest is a hash value that identifies a specific version of an image. For information about Amazon ECR paths, see Pulling an Image in the Amazon ECR User Guide .

            • SpecifiedImage (string) --

              The image path you specified when you created the model.

            • ResolvedImage (string) --

              The specific digest path of the image hosted in this ProductionVariant .

            • ResolutionTime (datetime) --

              The date and time when the image path for the model resolved to the ResolvedImage

        • CurrentWeight (float) --

          The weight associated with the variant.

        • DesiredWeight (float) --

          The requested weight, as specified in the UpdateEndpointWeightsAndCapacities request.

        • CurrentInstanceCount (integer) --

          The number of instances associated with the variant.

        • DesiredInstanceCount (integer) --

          The number of instances requested in the UpdateEndpointWeightsAndCapacities request.

    • EndpointStatus (string) --

      The status of the endpoint.

    • FailureReason (string) --

      If the status of the endpoint is Failed , the reason why it failed.

    • CreationTime (datetime) --

      A timestamp that shows when the endpoint was created.

    • LastModifiedTime (datetime) --

      A timestamp that shows when the endpoint was last modified.

DescribeNotebookInstance (updated) Link ¶
Changes (response)
{'NotebookInstanceStatus': {'Updating'}}

Returns information about a notebook instance.

See also: AWS API Documentation

Request Syntax

client.describe_notebook_instance(
    NotebookInstanceName='string'
)
type NotebookInstanceName

string

param NotebookInstanceName

[REQUIRED]

The name of the notebook instance that you want information about.

rtype

dict

returns

Response Syntax

{
    'NotebookInstanceArn': 'string',
    'NotebookInstanceName': 'string',
    'NotebookInstanceStatus': 'Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating',
    'FailureReason': 'string',
    'Url': 'string',
    'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge',
    'SubnetId': 'string',
    'SecurityGroups': [
        'string',
    ],
    'RoleArn': 'string',
    'KmsKeyId': 'string',
    'NetworkInterfaceId': 'string',
    'LastModifiedTime': datetime(2015, 1, 1),
    'CreationTime': datetime(2015, 1, 1),
    'NotebookInstanceLifecycleConfigName': 'string',
    'DirectInternetAccess': 'Enabled'|'Disabled'
}

Response Structure

  • (dict) --

    • NotebookInstanceArn (string) --

      The Amazon Resource Name (ARN) of the notebook instance.

    • NotebookInstanceName (string) --

      Name of the Amazon SageMaker notebook instance.

    • NotebookInstanceStatus (string) --

      The status of the notebook instance.

    • FailureReason (string) --

      If status is failed, the reason it failed.

    • Url (string) --

      The URL that you use to connect to the Jupyter notebook that is running in your notebook instance.

    • InstanceType (string) --

      The type of ML compute instance running on the notebook instance.

    • SubnetId (string) --

      The ID of the VPC subnet.

    • SecurityGroups (list) --

      The IDs of the VPC security groups.

      • (string) --

    • RoleArn (string) --

      Amazon Resource Name (ARN) of the IAM role associated with the instance.

    • KmsKeyId (string) --

      AWS KMS key ID Amazon SageMaker uses to encrypt data when storing it on the ML storage volume attached to the instance.

    • NetworkInterfaceId (string) --

      Network interface IDs that Amazon SageMaker created at the time of creating the instance.

    • LastModifiedTime (datetime) --

      A timestamp. Use this parameter to retrieve the time when the notebook instance was last modified.

    • CreationTime (datetime) --

      A timestamp. Use this parameter to return the time when the notebook instance was created

    • NotebookInstanceLifecycleConfigName (string) --

      Returns the name of a notebook instance lifecycle configuration.

      For information about notebook instance lifestyle configurations, see notebook-lifecycle-config.

    • DirectInternetAccess (string) --

      Describes whether Amazon SageMaker provides internet access to the notebook instance. If this value is set to Disabled, he notebook instance does not have internet access, and cannot connect to Amazon SageMaker training and endpoint services .

      For more information, see appendix-notebook-and-internet-access.

ListNotebookInstances (updated) Link ¶
Changes (request, response)
Request
{'StatusEquals': {'Updating'}}
Response
{'NotebookInstances': {'NotebookInstanceStatus': {'Updating'}}}

Returns a list of the Amazon SageMaker notebook instances in the requester's account in an AWS Region.

See also: AWS API Documentation

Request Syntax

client.list_notebook_instances(
    NextToken='string',
    MaxResults=123,
    SortBy='Name'|'CreationTime'|'Status',
    SortOrder='Ascending'|'Descending',
    NameContains='string',
    CreationTimeBefore=datetime(2015, 1, 1),
    CreationTimeAfter=datetime(2015, 1, 1),
    LastModifiedTimeBefore=datetime(2015, 1, 1),
    LastModifiedTimeAfter=datetime(2015, 1, 1),
    StatusEquals='Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating',
    NotebookInstanceLifecycleConfigNameContains='string'
)
type NextToken

string

param NextToken

If the previous call to the ListNotebookInstances is truncated, the response includes a NextToken . You can use this token in your subsequent ListNotebookInstances request to fetch the next set of notebook instances.

Note

You might specify a filter or a sort order in your request. When response is truncated, you must use the same values for the filer and sort order in the next request.

type MaxResults

integer

param MaxResults

The maximum number of notebook instances to return.

type SortBy

string

param SortBy

The field to sort results by. The default is Name .

type SortOrder

string

param SortOrder

The sort order for results.

type NameContains

string

param NameContains

A string in the notebook instances' name. This filter returns only notebook instances whose name contains the specified string.

type CreationTimeBefore

datetime

param CreationTimeBefore

A filter that returns only notebook instances that were created before the specified time (timestamp).

type CreationTimeAfter

datetime

param CreationTimeAfter

A filter that returns only notebook instances that were created after the specified time (timestamp).

type LastModifiedTimeBefore

datetime

param LastModifiedTimeBefore

A filter that returns only notebook instances that were modified before the specified time (timestamp).

type LastModifiedTimeAfter

datetime

param LastModifiedTimeAfter

A filter that returns only notebook instances that were modified after the specified time (timestamp).

type StatusEquals

string

param StatusEquals

A filter that returns only notebook instances with the specified status.

type NotebookInstanceLifecycleConfigNameContains

string

param NotebookInstanceLifecycleConfigNameContains

A string in the name of a notebook instances lifecycle configuration associated with this notebook instance. This filter returns only notebook instances associated with a lifecycle configuration with a name that contains the specified string.

rtype

dict

returns

Response Syntax

{
    'NextToken': 'string',
    'NotebookInstances': [
        {
            'NotebookInstanceName': 'string',
            'NotebookInstanceArn': 'string',
            'NotebookInstanceStatus': 'Pending'|'InService'|'Stopping'|'Stopped'|'Failed'|'Deleting'|'Updating',
            'Url': 'string',
            'InstanceType': 'ml.t2.medium'|'ml.t2.large'|'ml.t2.xlarge'|'ml.t2.2xlarge'|'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge',
            'CreationTime': datetime(2015, 1, 1),
            'LastModifiedTime': datetime(2015, 1, 1),
            'NotebookInstanceLifecycleConfigName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      If the response to the previous ListNotebookInstances request was truncated, Amazon SageMaker returns this token. To retrieve the next set of notebook instances, use the token in the next request.

    • NotebookInstances (list) --

      An array of NotebookInstanceSummary objects, one for each notebook instance.

      • (dict) --

        Provides summary information for an Amazon SageMaker notebook instance.

        • NotebookInstanceName (string) --

          The name of the notebook instance that you want a summary for.

        • NotebookInstanceArn (string) --

          The Amazon Resource Name (ARN) of the notebook instance.

        • NotebookInstanceStatus (string) --

          The status of the notebook instance.

        • Url (string) --

          The URL that you use to connect to the Jupyter instance running in your notebook instance.

        • InstanceType (string) --

          The type of ML compute instance that the notebook instance is running on.

        • CreationTime (datetime) --

          A timestamp that shows when the notebook instance was created.

        • LastModifiedTime (datetime) --

          A timestamp that shows when the notebook instance was last modified.

        • NotebookInstanceLifecycleConfigName (string) --

          The name of a notebook instance lifecycle configuration associated with this notebook instance.

          For information about notebook instance lifestyle configurations, see notebook-lifecycle-config.