2021/12/08 - Amazon Lookout for Vision - 3 new api methods
Changes This release adds new APIs for packaging an Amazon Lookout for Vision model as an AWS IoT Greengrass component.
Lists the model packaging jobs created for an Amazon Lookout for Vision project.
This operation requires permissions to perform the lookoutvision:ListModelPackagingJobs operation.
For more information, see Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.
See also: AWS API Documentation
Request Syntax
client.list_model_packaging_jobs( ProjectName='string', NextToken='string', MaxResults=123 )
string
[REQUIRED]
The name of the project for which you want to list the model packaging jobs.
string
If the previous response was incomplete (because there is more results to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
integer
The maximum number of results to return per paginated call. The largest value you can specify is 100. If you specify a value greater than 100, a ValidationException error occurs. The default value is 100.
dict
Response Syntax
{ 'ModelPackagingJobs': [ { 'JobName': 'string', 'ProjectName': 'string', 'ModelVersion': 'string', 'ModelPackagingJobDescription': 'string', 'ModelPackagingMethod': 'string', 'Status': 'CREATED'|'RUNNING'|'SUCCEEDED'|'FAILED', 'StatusMessage': 'string', 'CreationTimestamp': datetime(2015, 1, 1), 'LastUpdatedTimestamp': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) --
ModelPackagingJobs (list) --
A list of the model packaging jobs created for the specified Amazon Lookout for Vision project.
(dict) --
Metadata for a model packaging job. For more information, see ListModelPackagingJobs.
JobName (string) --
The name of the model packaging job.
ProjectName (string) --
The project that contains the model that is in the model package.
ModelVersion (string) --
The version of the model that is in the model package.
ModelPackagingJobDescription (string) --
The description for the model packaging job.
ModelPackagingMethod (string) --
The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT Greengrass.
Status (string) --
The status of the model packaging job.
StatusMessage (string) --
The status message for the model packaging job.
CreationTimestamp (datetime) --
The Unix timestamp for the time and date that the model packaging job was created.
LastUpdatedTimestamp (datetime) --
The Unix timestamp for the time and date that the model packaging job was last updated.
NextToken (string) --
If the previous response was incomplete (because there is more results to retrieve), Amazon Lookout for Vision returns a pagination token in the response. You can use this pagination token to retrieve the next set of results.
Describes an Amazon Lookout for Vision model packaging job.
This operation requires permissions to perform the lookoutvision:DescribeModelPackagingJob operation.
For more information, see Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.
See also: AWS API Documentation
Request Syntax
client.describe_model_packaging_job( ProjectName='string', JobName='string' )
string
[REQUIRED]
The name of the project that contains the model packaging job that you want to describe.
string
[REQUIRED]
The job name for the model packaging job.
dict
Response Syntax
{ 'ModelPackagingDescription': { 'JobName': 'string', 'ProjectName': 'string', 'ModelVersion': 'string', 'ModelPackagingConfiguration': { 'Greengrass': { 'CompilerOptions': 'string', 'TargetDevice': 'jetson_xavier', 'TargetPlatform': { 'Os': 'LINUX', 'Arch': 'ARM64'|'X86_64', 'Accelerator': 'NVIDIA' }, 'S3OutputLocation': { 'Bucket': 'string', 'Prefix': 'string' }, 'ComponentName': 'string', 'ComponentVersion': 'string', 'ComponentDescription': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }, 'ModelPackagingJobDescription': 'string', 'ModelPackagingMethod': 'string', 'ModelPackagingOutputDetails': { 'Greengrass': { 'ComponentVersionArn': 'string', 'ComponentName': 'string', 'ComponentVersion': 'string' } }, 'Status': 'CREATED'|'RUNNING'|'SUCCEEDED'|'FAILED', 'StatusMessage': 'string', 'CreationTimestamp': datetime(2015, 1, 1), 'LastUpdatedTimestamp': datetime(2015, 1, 1) } }
Response Structure
(dict) --
ModelPackagingDescription (dict) --
The description of the model packaging job.
JobName (string) --
The name of the model packaging job.
ProjectName (string) --
The name of the project that's associated with a model that's in the model package.
ModelVersion (string) --
The version of the model used in the model packaging job.
ModelPackagingConfiguration (dict) --
The configuration information used in the model packaging job.
Greengrass (dict) --
Configuration information for the AWS IoT Greengrass component in a model packaging job.
CompilerOptions (string) --
Additional compiler options for the Greengrass component. Currently, only NVIDIA Graphics Processing Units (GPU) are supported.
For more information, see Compiler options in the Amazon Lookout for Vision Developer Guide.
TargetDevice (string) --
The target device for the model. Currently the only supported value is jetson_xavier. If you specify TargetDevice, you can't specify TargetPlatform.
TargetPlatform (dict) --
The target platform for the model. If you specify TargetPlatform, you can't specify TargetDevice.
Os (string) --
The target operating system for the model. Linux is the only operating system that is currently supported.
Arch (string) --
The target architecture for the model. The currently supported architectures are X86_64 (64-bit version of the x86 instruction set) and ARM_64 (ARMv8 64-bit CPU).
Accelerator (string) --
The target accelerator for the model. NVIDIA (Nvidia graphics processing unit) is the only accelerator that is currently supported. You must also specify the gpu-code, trt-ver, and cuda-ver compiler options.
S3OutputLocation (dict) --
An S3 location in which Lookout for Vision stores the component artifacts.
Bucket (string) --
The S3 bucket that contains the training or model packaging job output. If you are training a model, the bucket must in your AWS account. If you use an S3 bucket for a model packaging job, the S3 bucket must be in the same AWS Region and AWS account in which you use AWS IoT Greengrass.
Prefix (string) --
The path of the folder, within the S3 bucket, that contains the output.
ComponentName (string) --
A name for the AWS IoT Greengrass component.
ComponentVersion (string) --
A Version for the AWS IoT Greengrass component. If you don't provide a value, a default value of Model Version.0.0 is used.
ComponentDescription (string) --
A description for the AWS IoT Greengrass component.
Tags (list) --
A set of tags (key-value pairs) that you want to attach to the AWS IoT Greengrass component.
(dict) --
A key and value pair that is attached to the specified Amazon Lookout for Vision model.
Key (string) --
The key of the tag that is attached to the specified model.
Value (string) --
The value of the tag that is attached to the specified model.
ModelPackagingJobDescription (string) --
The description for the model packaging job.
ModelPackagingMethod (string) --
The AWS service used to package the job. Currently Lookout for Vision can package jobs with AWS IoT Greengrass.
ModelPackagingOutputDetails (dict) --
Information about the output of the model packaging job. For more information, see DescribeModelPackagingJob.
Greengrass (dict) --
Information about the AWS IoT Greengrass component in a model packaging job.
ComponentVersionArn (string) --
The Amazon Resource Name (ARN) of the component.
ComponentName (string) --
The name of the component.
ComponentVersion (string) --
The version of the component.
Status (string) --
The status of the model packaging job.
StatusMessage (string) --
The status message for the model packaging job.
CreationTimestamp (datetime) --
The Unix timestamp for the time and date that the model packaging job was created.
LastUpdatedTimestamp (datetime) --
The Unix timestamp for the time and date that the model packaging job was last updated.
Starts an Amazon Lookout for Vision model packaging job. A model packaging job creates an AWS IoT Greengrass component for a Lookout for Vision model. You can use the component to deploy your model to an edge device managed by Greengrass.
Use the DescribeModelPackagingJob API to determine the current status of the job. The model packaging job is complete if the value of Status is SUCCEEDED.
To deploy the component to the target device, use the component name and component version with the AWS IoT Greengrass CreateDeployment API.
This operation requires the following permissions:
lookoutvision:StartModelPackagingJobs
s3:PutObject
s3:GetBucketLocation
greengrass:CreateComponentVersion
greengrass:DescribeComponent
(Optional) greengrass:TagResource. Only required if you want to tag the component.
For more information, see Using your Amazon Lookout for Vision model on an edge device in the Amazon Lookout for Vision Developer Guide.
See also: AWS API Documentation
Request Syntax
client.start_model_packaging_job( ProjectName='string', ModelVersion='string', JobName='string', Configuration={ 'Greengrass': { 'CompilerOptions': 'string', 'TargetDevice': 'jetson_xavier', 'TargetPlatform': { 'Os': 'LINUX', 'Arch': 'ARM64'|'X86_64', 'Accelerator': 'NVIDIA' }, 'S3OutputLocation': { 'Bucket': 'string', 'Prefix': 'string' }, 'ComponentName': 'string', 'ComponentVersion': 'string', 'ComponentDescription': 'string', 'Tags': [ { 'Key': 'string', 'Value': 'string' }, ] } }, Description='string', ClientToken='string' )
string
[REQUIRED]
The name of the project which contains the version of the model that you want to package.
string
[REQUIRED]
The version of the model within the project that you want to package.
string
A name for the model packaging job. If you don't supply a value, the service creates a job name for you.
dict
[REQUIRED]
The configuration for the model packaging job.
Greengrass (dict) -- [REQUIRED]
Configuration information for the AWS IoT Greengrass component in a model packaging job.
CompilerOptions (string) -- [REQUIRED]
Additional compiler options for the Greengrass component. Currently, only NVIDIA Graphics Processing Units (GPU) are supported.
For more information, see Compiler options in the Amazon Lookout for Vision Developer Guide.
TargetDevice (string) --
The target device for the model. Currently the only supported value is jetson_xavier. If you specify TargetDevice, you can't specify TargetPlatform.
TargetPlatform (dict) --
The target platform for the model. If you specify TargetPlatform, you can't specify TargetDevice.
Os (string) -- [REQUIRED]
The target operating system for the model. Linux is the only operating system that is currently supported.
Arch (string) -- [REQUIRED]
The target architecture for the model. The currently supported architectures are X86_64 (64-bit version of the x86 instruction set) and ARM_64 (ARMv8 64-bit CPU).
Accelerator (string) -- [REQUIRED]
The target accelerator for the model. NVIDIA (Nvidia graphics processing unit) is the only accelerator that is currently supported. You must also specify the gpu-code, trt-ver, and cuda-ver compiler options.
S3OutputLocation (dict) -- [REQUIRED]
An S3 location in which Lookout for Vision stores the component artifacts.
Bucket (string) -- [REQUIRED]
The S3 bucket that contains the training or model packaging job output. If you are training a model, the bucket must in your AWS account. If you use an S3 bucket for a model packaging job, the S3 bucket must be in the same AWS Region and AWS account in which you use AWS IoT Greengrass.
Prefix (string) --
The path of the folder, within the S3 bucket, that contains the output.
ComponentName (string) -- [REQUIRED]
A name for the AWS IoT Greengrass component.
ComponentVersion (string) --
A Version for the AWS IoT Greengrass component. If you don't provide a value, a default value of Model Version.0.0 is used.
ComponentDescription (string) --
A description for the AWS IoT Greengrass component.
Tags (list) --
A set of tags (key-value pairs) that you want to attach to the AWS IoT Greengrass component.
(dict) --
A key and value pair that is attached to the specified Amazon Lookout for Vision model.
Key (string) -- [REQUIRED]
The key of the tag that is attached to the specified model.
Value (string) -- [REQUIRED]
The value of the tag that is attached to the specified model.
string
A description for the model packaging job.
string
ClientToken is an idempotency token that ensures a call to StartModelPackagingJob completes only once. You choose the value to pass. For example, An issue might prevent you from getting a response from StartModelPackagingJob. In this case, safely retry your call to StartModelPackagingJob by using the same ClientToken parameter value.
If you don't supply a value for ClientToken, the AWS SDK you are using inserts a value for you. This prevents retries after a network error from making multiple dataset creation requests. You'll need to provide your own value for other use cases.
An error occurs if the other input parameters are not the same as in the first request. Using a different value for ClientToken is considered a new call to StartModelPackagingJob. An idempotency token is active for 8 hours.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'JobName': 'string' }
Response Structure
(dict) --
JobName (string) --
The job name for the model packaging job. If you don't supply a job name in the JobName input parameter, the service creates a job name for you.