Amazon SageMaker Service

2022/12/19 - Amazon SageMaker Service - 2 new 3 updated api methods

Changes  AWS Sagemaker - Sagemaker Images now supports Aliases as secondary identifiers for ImageVersions. SageMaker Images now supports additional metadata for ImageVersions for better images management.

ListAliases (new) Link ¶

Lists the aliases of a specified image or image version.

See also: AWS API Documentation

Request Syntax

client.list_aliases(
    ImageName='string',
    Alias='string',
    Version=123,
    MaxResults=123,
    NextToken='string'
)
type ImageName

string

param ImageName

[REQUIRED]

The name of the image.

type Alias

string

param Alias

The alias of the image version.

type Version

integer

param Version

The version of the image. If image version is not specified, the aliases of all versions of the image are listed.

type MaxResults

integer

param MaxResults

The maximum number of aliases to return.

type NextToken

string

param NextToken

If the previous call to ListAliases didn't return the full set of aliases, the call returns a token for retrieving the next set of aliases.

rtype

dict

returns

Response Syntax

{
    'SageMakerImageVersionAliases': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SageMakerImageVersionAliases (list) --

      A list of SageMaker image version aliases.

      • (string) --

    • NextToken (string) --

      A token for getting the next set of aliases, if more aliases exist.

UpdateImageVersion (new) Link ¶

Updates the properties of a SageMaker image version.

See also: AWS API Documentation

Request Syntax

client.update_image_version(
    ImageName='string',
    Alias='string',
    Version=123,
    AliasesToAdd=[
        'string',
    ],
    AliasesToDelete=[
        'string',
    ],
    VendorGuidance='NOT_PROVIDED'|'STABLE'|'TO_BE_ARCHIVED'|'ARCHIVED',
    JobType='TRAINING'|'INFERENCE'|'NOTEBOOK_KERNEL',
    MLFramework='string',
    ProgrammingLang='string',
    Processor='CPU'|'GPU',
    Horovod=True|False,
    ReleaseNotes='string'
)
type ImageName

string

param ImageName

[REQUIRED]

The name of the image.

type Alias

string

param Alias

The alias of the image version.

type Version

integer

param Version

The version of the image.

type AliasesToAdd

list

param AliasesToAdd

A list of aliases to add.

  • (string) --

type AliasesToDelete

list

param AliasesToDelete

A list of aliases to delete.

  • (string) --

type VendorGuidance

string

param VendorGuidance

The availability of the image version specified by the maintainer.

  • NOT_PROVIDED : The maintainers did not provide a status for image version stability.

  • STABLE : The image version is stable.

  • TO_BE_ARCHIVED : The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months.

  • ARCHIVED : The image version is archived. Archived image versions are not searchable and are no longer actively supported.

type JobType

string

param JobType

Indicates SageMaker job type compatibility.

  • TRAINING : The image version is compatible with SageMaker training jobs.

  • INFERENCE : The image version is compatible with SageMaker inference jobs.

  • NOTEBOOK_KERNEL : The image version is compatible with SageMaker notebook kernels.

type MLFramework

string

param MLFramework

The machine learning framework vended in the image version.

type ProgrammingLang

string

param ProgrammingLang

The supported programming language and its version.

type Processor

string

param Processor

Indicates CPU or GPU compatibility.

  • CPU : The image version is compatible with CPU.

  • GPU : The image version is compatible with GPU.

type Horovod

boolean

param Horovod

Indicates Horovod compatibility.

type ReleaseNotes

string

param ReleaseNotes

The maintainer description of the image version.

rtype

dict

returns

Response Syntax

{
    'ImageVersionArn': 'string'
}

Response Structure

  • (dict) --

    • ImageVersionArn (string) --

      The ARN of the image version.

CreateImageVersion (updated) Link ¶
Changes (request)
{'Aliases': ['string'],
 'Horovod': 'boolean',
 'JobType': 'TRAINING | INFERENCE | NOTEBOOK_KERNEL',
 'MLFramework': 'string',
 'Processor': 'CPU | GPU',
 'ProgrammingLang': 'string',
 'ReleaseNotes': 'string',
 'VendorGuidance': 'NOT_PROVIDED | STABLE | TO_BE_ARCHIVED | ARCHIVED'}

Creates a version of the SageMaker image specified by ImageName . The version represents the Amazon Elastic Container Registry (ECR) container image specified by BaseImage .

See also: AWS API Documentation

Request Syntax

client.create_image_version(
    BaseImage='string',
    ClientToken='string',
    ImageName='string',
    Aliases=[
        'string',
    ],
    VendorGuidance='NOT_PROVIDED'|'STABLE'|'TO_BE_ARCHIVED'|'ARCHIVED',
    JobType='TRAINING'|'INFERENCE'|'NOTEBOOK_KERNEL',
    MLFramework='string',
    ProgrammingLang='string',
    Processor='CPU'|'GPU',
    Horovod=True|False,
    ReleaseNotes='string'
)
type BaseImage

string

param BaseImage

[REQUIRED]

The registry path of the container image to use as the starting point for this version. The path is an Amazon Elastic Container Registry (ECR) URI in the following format:

<acct-id>.dkr.ecr.<region>.amazonaws.com/<repo-name[:tag] or [@digest]>

type ClientToken

string

param ClientToken

[REQUIRED]

A unique ID. If not specified, the Amazon Web Services CLI and Amazon Web Services SDKs, such as the SDK for Python (Boto3), add a unique value to the call.

This field is autopopulated if not provided.

type ImageName

string

param ImageName

[REQUIRED]

The ImageName of the Image to create a version of.

type Aliases

list

param Aliases

A list of aliases created with the image version.

  • (string) --

type VendorGuidance

string

param VendorGuidance

The stability of the image version, specified by the maintainer.

  • NOT_PROVIDED : The maintainers did not provide a status for image version stability.

  • STABLE : The image version is stable.

  • TO_BE_ARCHIVED : The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months.

  • ARCHIVED : The image version is archived. Archived image versions are not searchable and are no longer actively supported.

type JobType

string

param JobType

Indicates SageMaker job type compatibility.

  • TRAINING : The image version is compatible with SageMaker training jobs.

  • INFERENCE : The image version is compatible with SageMaker inference jobs.

  • NOTEBOOK_KERNEL : The image version is compatible with SageMaker notebook kernels.

type MLFramework

string

param MLFramework

The machine learning framework vended in the image version.

type ProgrammingLang

string

param ProgrammingLang

The supported programming language and its version.

type Processor

string

param Processor

Indicates CPU or GPU compatibility.

  • CPU : The image version is compatible with CPU.

  • GPU : The image version is compatible with GPU.

type Horovod

boolean

param Horovod

Indicates Horovod compatibility.

type ReleaseNotes

string

param ReleaseNotes

The maintainer description of the image version.

rtype

dict

returns

Response Syntax

{
    'ImageVersionArn': 'string'
}

Response Structure

  • (dict) --

    • ImageVersionArn (string) --

      The ARN of the image version.

DeleteImageVersion (updated) Link ¶
Changes (request)
{'Alias': 'string'}

Deletes a version of a SageMaker image. The container image the version represents isn't deleted.

See also: AWS API Documentation

Request Syntax

client.delete_image_version(
    ImageName='string',
    Version=123,
    Alias='string'
)
type ImageName

string

param ImageName

[REQUIRED]

The name of the image to delete.

type Version

integer

param Version

The version to delete.

type Alias

string

param Alias

The alias of the image to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeImageVersion (updated) Link ¶
Changes (request, response)
Request
{'Alias': 'string'}
Response
{'Horovod': 'boolean',
 'JobType': 'TRAINING | INFERENCE | NOTEBOOK_KERNEL',
 'MLFramework': 'string',
 'Processor': 'CPU | GPU',
 'ProgrammingLang': 'string',
 'ReleaseNotes': 'string',
 'VendorGuidance': 'NOT_PROVIDED | STABLE | TO_BE_ARCHIVED | ARCHIVED'}

Describes a version of a SageMaker image.

See also: AWS API Documentation

Request Syntax

client.describe_image_version(
    ImageName='string',
    Version=123,
    Alias='string'
)
type ImageName

string

param ImageName

[REQUIRED]

The name of the image.

type Version

integer

param Version

The version of the image. If not specified, the latest version is described.

type Alias

string

param Alias

The alias of the image version.

rtype

dict

returns

Response Syntax

{
    'BaseImage': 'string',
    'ContainerImage': 'string',
    'CreationTime': datetime(2015, 1, 1),
    'FailureReason': 'string',
    'ImageArn': 'string',
    'ImageVersionArn': 'string',
    'ImageVersionStatus': 'CREATING'|'CREATED'|'CREATE_FAILED'|'DELETING'|'DELETE_FAILED',
    'LastModifiedTime': datetime(2015, 1, 1),
    'Version': 123,
    'VendorGuidance': 'NOT_PROVIDED'|'STABLE'|'TO_BE_ARCHIVED'|'ARCHIVED',
    'JobType': 'TRAINING'|'INFERENCE'|'NOTEBOOK_KERNEL',
    'MLFramework': 'string',
    'ProgrammingLang': 'string',
    'Processor': 'CPU'|'GPU',
    'Horovod': True|False,
    'ReleaseNotes': 'string'
}

Response Structure

  • (dict) --

    • BaseImage (string) --

      The registry path of the container image on which this image version is based.

    • ContainerImage (string) --

      The registry path of the container image that contains this image version.

    • CreationTime (datetime) --

      When the version was created.

    • FailureReason (string) --

      When a create or delete operation fails, the reason for the failure.

    • ImageArn (string) --

      The ARN of the image the version is based on.

    • ImageVersionArn (string) --

      The ARN of the version.

    • ImageVersionStatus (string) --

      The status of the version.

    • LastModifiedTime (datetime) --

      When the version was last modified.

    • Version (integer) --

      The version number.

    • VendorGuidance (string) --

      The stability of the image version specified by the maintainer.

      • NOT_PROVIDED : The maintainers did not provide a status for image version stability.

      • STABLE : The image version is stable.

      • TO_BE_ARCHIVED : The image version is set to be archived. Custom image versions that are set to be archived are automatically archived after three months.

      • ARCHIVED : The image version is archived. Archived image versions are not searchable and are no longer actively supported.

    • JobType (string) --

      Indicates SageMaker job type compatibility.

      • TRAINING : The image version is compatible with SageMaker training jobs.

      • INFERENCE : The image version is compatible with SageMaker inference jobs.

      • NOTEBOOK_KERNEL : The image version is compatible with SageMaker notebook kernels.

    • MLFramework (string) --

      The machine learning framework vended in the image version.

    • ProgrammingLang (string) --

      The supported programming language and its version.

    • Processor (string) --

      Indicates CPU or GPU compatibility.

      • CPU : The image version is compatible with CPU.

      • GPU : The image version is compatible with GPU.

    • Horovod (boolean) --

      Indicates Horovod compatibility.

    • ReleaseNotes (string) --

      The maintainer description of the image version.