algorithms
Creates, updates, deletes, gets or lists an algorithms resource.
Overview
| Name | algorithms |
| Type | Resource |
| Id | aws.sagemaker.algorithms |
Fields
The following fields are returned by SELECT queries:
- describe_algorithm
- list_algorithms
| Name | Datatype | Description |
|---|---|---|
algorithm_arn | string | The Amazon Resource Name (ARN) of the algorithm. (pattern: <code>arn:aws[a-z-]*:sagemaker:[a-z0-9-]{9,16}:[0-9]{12}:algorithm/[\S]{1,2048}</code>) |
algorithm_description | string | A brief summary about the algorithm. (pattern: <code>[\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*</code>) |
algorithm_name | string | The name of the algorithm being described. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
algorithm_status | string | The current status of the algorithm. (Pending, InProgress, Completed, Failed, Deleting) |
algorithm_status_details | object | Details about the current status of the algorithm. |
certify_for_marketplace | boolean | Whether the algorithm is certified to be listed in Amazon Web Services Marketplace. |
creation_time | string (date-time) | A timestamp specifying when the algorithm was created. |
inference_specification | object | Details about inference jobs that the algorithm runs. |
product_id | string | The product identifier of the algorithm. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9])</code>) |
training_specification | object | Details about training jobs run by this algorithm. |
validation_specification | object | Details about configurations for one or more training jobs that SageMaker runs to test the algorithm. |
| Name | Datatype | Description |
|---|---|---|
algorithm_arn | string | The Amazon Resource Name (ARN) of the algorithm. (pattern: <code>arn:aws[a-z-]*:sagemaker:[a-z0-9-]{9,16}:[0-9]{12}:algorithm/[\S]{1,2048}</code>) |
algorithm_description | string | A brief description of the algorithm. (pattern: <code>[\p{L}\p{M}\p{Z}\p{S}\p{N}\p{P}]*</code>) |
algorithm_name | string | The name of the algorithm that is described by the summary. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
algorithm_status | string | The overall status of the algorithm. (Pending, InProgress, Completed, Failed, Deleting) |
creation_time | string (date-time) | A timestamp that shows when the algorithm was created. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_algorithm | select | region | Returns a description of the specified algorithm that is in your account. | |
list_algorithms | select | region | Lists the machine learning algorithms that have been created. | |
create_algorithm | insert | region, AlgorithmName, TrainingSpecification | Create a machine learning algorithm that you can use in SageMaker and list in the Amazon Web Services Marketplace. | |
delete_algorithm | delete | region | Removes the specified algorithm from your account. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_algorithm
- list_algorithms
Returns a description of the specified algorithm that is in your account.
SELECT
algorithm_arn,
algorithm_description,
algorithm_name,
algorithm_status,
algorithm_status_details,
certify_for_marketplace,
creation_time,
inference_specification,
product_id,
training_specification,
validation_specification
FROM aws.sagemaker.algorithms
WHERE region = '{{ region }}' -- required
;
Lists the machine learning algorithms that have been created.
SELECT
algorithm_arn,
algorithm_description,
algorithm_name,
algorithm_status,
creation_time
FROM aws.sagemaker.algorithms
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_algorithm
- Manifest
Create a machine learning algorithm that you can use in SageMaker and list in the Amazon Web Services Marketplace.
INSERT INTO aws.sagemaker.algorithms (
AlgorithmName,
AlgorithmDescription,
TrainingSpecification,
InferenceSpecification,
ValidationSpecification,
CertifyForMarketplace,
Tags,
region
)
SELECT
'{{ AlgorithmName }}' /* required */,
'{{ AlgorithmDescription }}',
'{{ TrainingSpecification }}' /* required */,
'{{ InferenceSpecification }}',
'{{ ValidationSpecification }}',
{{ CertifyForMarketplace }},
'{{ Tags }}',
'{{ region }}'
RETURNING
algorithm_arn
;
# Description fields are for documentation purposes
- name: algorithms
props:
- name: region
value: "{{ region }}"
description: Required parameter for the algorithms resource.
- name: AlgorithmName
value: "{{ AlgorithmName }}"
description: |
The name of the algorithm.
- name: AlgorithmDescription
value: "{{ AlgorithmDescription }}"
description: |
A description of the algorithm.
- name: TrainingSpecification
description: |
Specifies details about training jobs run by this algorithm, including the following: The Amazon ECR path of the container and the version digest of the algorithm. The hyperparameters that the algorithm supports. The instance types that the algorithm supports for training. Whether the algorithm supports distributed training. The metrics that the algorithm emits to Amazon CloudWatch. Which metrics that the algorithm emits can be used as the objective metric for hyperparameter tuning jobs. The input channels that the algorithm supports for training data. For example, an algorithm might support train, validation, and test channels.
value:
TrainingImage: "{{ TrainingImage }}"
TrainingImageDigest: "{{ TrainingImageDigest }}"
SupportedHyperParameters:
- Name: "{{ Name }}"
Description: "{{ Description }}"
Type: "{{ Type }}"
Range:
IntegerParameterRangeSpecification:
MinValue: "{{ MinValue }}"
MaxValue: "{{ MaxValue }}"
ContinuousParameterRangeSpecification:
MinValue: "{{ MinValue }}"
MaxValue: "{{ MaxValue }}"
CategoricalParameterRangeSpecification:
Values:
- "{{ Values }}"
IsTunable: {{ IsTunable }}
IsRequired: {{ IsRequired }}
DefaultValue: "{{ DefaultValue }}"
SupportedTrainingInstanceTypes:
- "{{ SupportedTrainingInstanceTypes }}"
SupportsDistributedTraining: {{ SupportsDistributedTraining }}
MetricDefinitions:
- Name: "{{ Name }}"
Regex: "{{ Regex }}"
TrainingChannels:
- Name: "{{ Name }}"
Description: "{{ Description }}"
IsRequired: {{ IsRequired }}
SupportedContentTypes: "{{ SupportedContentTypes }}"
SupportedCompressionTypes: "{{ SupportedCompressionTypes }}"
SupportedInputModes: "{{ SupportedInputModes }}"
SupportedTuningJobObjectiveMetrics:
- Type: "{{ Type }}"
MetricName: "{{ MetricName }}"
AdditionalS3DataSource:
S3DataType: "{{ S3DataType }}"
S3Uri: "{{ S3Uri }}"
CompressionType: "{{ CompressionType }}"
ETag: "{{ ETag }}"
- name: InferenceSpecification
description: |
Specifies details about inference jobs that the algorithm runs, including the following: The Amazon ECR paths of containers that contain the inference code and model artifacts. The instance types that the algorithm supports for transform jobs and real-time endpoints used for inference. The input and output content formats that the algorithm supports for inference.
value:
Containers:
- ContainerHostname: "{{ ContainerHostname }}"
Image: "{{ Image }}"
ImageDigest: "{{ ImageDigest }}"
ModelDataUrl: "{{ ModelDataUrl }}"
ModelDataSource:
S3DataSource:
S3Uri: "{{ S3Uri }}"
S3DataType: "{{ S3DataType }}"
CompressionType: "{{ CompressionType }}"
ModelAccessConfig:
AcceptEula: {{ AcceptEula }}
HubAccessConfig:
HubContentArn: "{{ HubContentArn }}"
ManifestS3Uri: "{{ ManifestS3Uri }}"
ETag: "{{ ETag }}"
ManifestEtag: "{{ ManifestEtag }}"
ProductId: "{{ ProductId }}"
Environment: "{{ Environment }}"
ModelInput:
DataInputConfig: "{{ DataInputConfig }}"
Framework: "{{ Framework }}"
FrameworkVersion: "{{ FrameworkVersion }}"
NearestModelName: "{{ NearestModelName }}"
AdditionalModelDataSources: "{{ AdditionalModelDataSources }}"
AdditionalS3DataSource:
S3DataType: "{{ S3DataType }}"
S3Uri: "{{ S3Uri }}"
CompressionType: "{{ CompressionType }}"
ETag: "{{ ETag }}"
ModelDataETag: "{{ ModelDataETag }}"
IsCheckpoint: {{ IsCheckpoint }}
BaseModel:
HubContentName: "{{ HubContentName }}"
HubContentVersion: "{{ HubContentVersion }}"
RecipeName: "{{ RecipeName }}"
SupportedTransformInstanceTypes:
- "{{ SupportedTransformInstanceTypes }}"
SupportedRealtimeInferenceInstanceTypes:
- "{{ SupportedRealtimeInferenceInstanceTypes }}"
SupportedContentTypes:
- "{{ SupportedContentTypes }}"
SupportedResponseMIMETypes:
- "{{ SupportedResponseMIMETypes }}"
- name: ValidationSpecification
description: |
Specifies configurations for one or more training jobs and that SageMaker runs to test the algorithm's training code and, optionally, one or more batch transform jobs that SageMaker runs to test the algorithm's inference code.
value:
ValidationRole: "{{ ValidationRole }}"
ValidationProfiles:
- ProfileName: "{{ ProfileName }}"
TrainingJobDefinition:
TrainingInputMode: "{{ TrainingInputMode }}"
HyperParameters: "{{ HyperParameters }}"
InputDataConfig:
- ChannelName: "{{ ChannelName }}"
DataSource:
S3DataSource: "{{ S3DataSource }}"
FileSystemDataSource: "{{ FileSystemDataSource }}"
DatasetSource: "{{ DatasetSource }}"
ContentType: "{{ ContentType }}"
CompressionType: "{{ CompressionType }}"
RecordWrapperType: "{{ RecordWrapperType }}"
InputMode: "{{ InputMode }}"
ShuffleConfig:
Seed: {{ Seed }}
OutputDataConfig:
KmsKeyId: "{{ KmsKeyId }}"
S3OutputPath: "{{ S3OutputPath }}"
CompressionType: "{{ CompressionType }}"
ResourceConfig:
InstanceType: "{{ InstanceType }}"
InstanceCount: {{ InstanceCount }}
VolumeSizeInGB: {{ VolumeSizeInGB }}
VolumeKmsKeyId: "{{ VolumeKmsKeyId }}"
KeepAlivePeriodInSeconds: {{ KeepAlivePeriodInSeconds }}
InstanceGroups:
- InstanceType: "{{ InstanceType }}"
InstanceCount: {{ InstanceCount }}
InstanceGroupName: "{{ InstanceGroupName }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
InstancePlacementConfig:
EnableMultipleJobs: {{ EnableMultipleJobs }}
PlacementSpecifications: "{{ PlacementSpecifications }}"
StoppingCondition:
MaxRuntimeInSeconds: {{ MaxRuntimeInSeconds }}
MaxWaitTimeInSeconds: {{ MaxWaitTimeInSeconds }}
MaxPendingTimeInSeconds: {{ MaxPendingTimeInSeconds }}
TransformJobDefinition:
MaxConcurrentTransforms: {{ MaxConcurrentTransforms }}
MaxPayloadInMB: {{ MaxPayloadInMB }}
BatchStrategy: "{{ BatchStrategy }}"
Environment: "{{ Environment }}"
TransformInput:
DataSource:
S3DataSource: "{{ S3DataSource }}"
ContentType: "{{ ContentType }}"
CompressionType: "{{ CompressionType }}"
SplitType: "{{ SplitType }}"
TransformOutput:
S3OutputPath: "{{ S3OutputPath }}"
Accept: "{{ Accept }}"
AssembleWith: "{{ AssembleWith }}"
KmsKeyId: "{{ KmsKeyId }}"
TransformResources:
InstanceType: "{{ InstanceType }}"
InstanceCount: {{ InstanceCount }}
VolumeKmsKeyId: "{{ VolumeKmsKeyId }}"
TransformAmiVersion: "{{ TransformAmiVersion }}"
- name: CertifyForMarketplace
value: {{ CertifyForMarketplace }}
description: |
Whether to certify the algorithm so that it can be listed in Amazon Web Services Marketplace.
- name: Tags
description: |
An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_algorithm
Removes the specified algorithm from your account.
DELETE FROM aws.sagemaker.algorithms
WHERE region = '{{ region }}' --required
;