solution_versions
Creates, updates, deletes, gets or lists a solution_versions resource.
Overview
| Name | solution_versions |
| Type | Resource |
| Id | aws.personalize.solution_versions |
Fields
The following fields are returned by SELECT queries:
- describe_solution_version
- list_solution_versions
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the solution version. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>) |
creation_date_time | string (date-time) | The date and time (in Unix time) that this version of the solution was created. |
dataset_group_arn | string | The Amazon Resource Name (ARN) of the dataset group providing the training data. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
event_type | string | The event type (for example, 'click' or 'like') that is used for training the model. |
failure_reason | string | If training a solution version fails, the reason for the failure. |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the solution was last updated. |
perform_auto_ml | boolean | When true, Amazon Personalize searches for the most optimal recipe according to the solution configuration. When false (the default), Amazon Personalize uses recipeArn. |
perform_hpo | boolean | Whether to perform hyperparameter optimization (HPO) on the chosen recipe. The default is false. |
perform_incremental_update | boolean | Whether the solution version should perform an incremental update. When set to true, the training will process only the data that has changed since the latest training, similar to when trainingMode is set to UPDATE. This can only be used with solution versions that use the User-Personalization recipe. |
recipe_arn | string | The ARN of the recipe used in the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
solution_arn | string | The ARN of the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
solution_config | object | Describes the configuration properties for the solution. |
solution_version_arn | string | The ARN of the solution version. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the solution version. A solution version can be in one of the following states: CREATE PENDING CREATE IN_PROGRESS ACTIVE CREATE FAILED CREATE STOPPING CREATE STOPPED |
training_hours | number (double) | The time used to train the model. You are billed for the time it takes to train a model. This field is visible only after Amazon Personalize successfully trains a model. |
training_mode | string | The scope of training to be performed when creating the solution version. A FULL training considers all of the data in your dataset group. An UPDATE processes only the data that has changed since the latest training. Only solution versions created with the User-Personalization recipe can use UPDATE. (FULL, UPDATE, AUTOTRAIN) |
training_type | string | Whether the solution version was created automatically or manually. (AUTOMATIC, MANUAL) |
tuned_hpo_params | object | If hyperparameter optimization was performed, contains the hyperparameter values of the best performing model. |
| Name | Datatype | Description |
|---|---|---|
creation_date_time | string (date-time) | The date and time (in Unix time) that this version of a solution was created. |
failure_reason | string | If a solution version fails, the reason behind the failure. |
last_updated_date_time | string (date-time) | The date and time (in Unix time) that the solution version was last updated. |
solution_version_arn | string | The Amazon Resource Name (ARN) of the solution version. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>) |
status | string | The status of the solution version. A solution version can be in one of the following states: CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED |
training_mode | string | The scope of training to be performed when creating the solution version. A FULL training considers all of the data in your dataset group. An UPDATE processes only the data that has changed since the latest training. Only solution versions created with the User-Personalization recipe can use UPDATE. (FULL, UPDATE, AUTOTRAIN) |
training_type | string | Whether the solution version was created automatically or manually. (AUTOMATIC, MANUAL) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_solution_version | select | region | Describes a specific version of a solution. For more information on solutions, see CreateSolution | |
list_solution_versions | select | region | Returns a list of solution versions for the given solution. When a solution is not specified, all the solution versions associated with the account are listed. The response provides the properties for each solution version, including the Amazon Resource Name (ARN). | |
create_solution_version | insert | region, solutionArn | Trains or retrains an active solution in a Custom dataset group. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion. A new version of the solution is created every time you call this operation. Status A solution version can be in one of the following states: CREATE PENDING CREATE IN_PROGRESS ACTIVE CREATE FAILED CREATE STOPPING CREATE STOPPED To get the status of the version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling CreateCampaign. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed. Related APIs ListSolutionVersions DescribeSolutionVersion ListSolutions CreateSolution DescribeSolution DeleteSolution | |
stop_solution_version_creation | exec | region, solutionVersionArn | Stops creating a solution version that is in a state of CREATE_PENDING or CREATE IN_PROGRESS. Depending on the current state of the solution version, the solution version state changes as follows: CREATE_PENDING > CREATE_STOPPED or CREATE_IN_PROGRESS > CREATE_STOPPING > CREATE_STOPPED You are billed for all of the training completed up until you stop the solution version creation. You cannot resume creating a solution version once it has been stopped. |
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_solution_version
- list_solution_versions
Describes a specific version of a solution. For more information on solutions, see CreateSolution
SELECT
name,
creation_date_time,
dataset_group_arn,
event_type,
failure_reason,
last_updated_date_time,
perform_auto_ml,
perform_hpo,
perform_incremental_update,
recipe_arn,
solution_arn,
solution_config,
solution_version_arn,
status,
training_hours,
training_mode,
training_type,
tuned_hpo_params
FROM aws.personalize.solution_versions
WHERE region = '{{ region }}' -- required
;
Returns a list of solution versions for the given solution. When a solution is not specified, all the solution versions associated with the account are listed. The response provides the properties for each solution version, including the Amazon Resource Name (ARN).
SELECT
creation_date_time,
failure_reason,
last_updated_date_time,
solution_version_arn,
status,
training_mode,
training_type
FROM aws.personalize.solution_versions
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_solution_version
- Manifest
Trains or retrains an active solution in a Custom dataset group. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion. A new version of the solution is created every time you call this operation. Status A solution version can be in one of the following states: CREATE PENDING CREATE IN_PROGRESS ACTIVE CREATE FAILED CREATE STOPPING CREATE STOPPED To get the status of the version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling CreateCampaign. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed. Related APIs ListSolutionVersions DescribeSolutionVersion ListSolutions CreateSolution DescribeSolution DeleteSolution
INSERT INTO aws.personalize.solution_versions (
name,
solutionArn,
trainingMode,
tags,
region
)
SELECT
'{{ name }}',
'{{ solutionArn }}' /* required */,
'{{ trainingMode }}',
'{{ tags }}',
'{{ region }}'
RETURNING
solution_version_arn
;
# Description fields are for documentation purposes
- name: solution_versions
props:
- name: region
value: "{{ region }}"
description: Required parameter for the solution_versions resource.
- name: name
value: "{{ name }}"
description: |
The name of the solution version.
- name: solutionArn
value: "{{ solutionArn }}"
description: |
The Amazon Resource Name (ARN) of the solution containing the training configuration information.
- name: trainingMode
value: "{{ trainingMode }}"
description: |
The scope of training to be performed when creating the solution version. The default is FULL. This creates a completely new model based on the entirety of the training data from the datasets in your dataset group. If you use User-Personalization, you can specify a training mode of UPDATE. This updates the model to consider new items for recommendations. It is not a full retraining. You should still complete a full retraining weekly. If you specify UPDATE, Amazon Personalize will stop automatic updates for the solution version. To resume updates, create a new solution with training mode set to FULL and deploy it in a campaign. For more information about automatic updates, see Automatic updates. The UPDATE option can only be used when you already have an active solution version created from the input solution using the FULL option and the input solution was trained with the User-Personalization recipe or the legacy HRNN-Coldstart recipe.
valid_values: ['FULL', 'UPDATE', 'AUTOTRAIN']
- name: tags
description: |
A list of tags to apply to the solution version.
value:
- tagKey: "{{ tagKey }}"
tagValue: "{{ tagValue }}"
Lifecycle Methods
- stop_solution_version_creation
Stops creating a solution version that is in a state of CREATE_PENDING or CREATE IN_PROGRESS. Depending on the current state of the solution version, the solution version state changes as follows: CREATE_PENDING > CREATE_STOPPED or CREATE_IN_PROGRESS > CREATE_STOPPING > CREATE_STOPPED You are billed for all of the training completed up until you stop the solution version creation. You cannot resume creating a solution version once it has been stopped.
EXEC aws.personalize.solution_versions.stop_solution_version_creation
@region='{{ region }}' --required
@@json=
'{
"solutionVersionArn": "{{ solutionVersionArn }}"
}'
;