Skip to main content

solution_versions

Creates, updates, deletes, gets or lists a solution_versions resource.

Overview

Namesolution_versions
TypeResource
Idaws.personalize.solution_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
namestringThe name of the solution version. (pattern: <code>^[a-zA-Z0-9][a-zA-Z0-9-_]*</code>)
creation_date_timestring (date-time)The date and time (in Unix time) that this version of the solution was created.
dataset_group_arnstringThe Amazon Resource Name (ARN) of the dataset group providing the training data. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
event_typestringThe event type (for example, 'click' or 'like') that is used for training the model.
failure_reasonstringIf training a solution version fails, the reason for the failure.
last_updated_date_timestring (date-time)The date and time (in Unix time) that the solution was last updated.
perform_auto_mlbooleanWhen true, Amazon Personalize searches for the most optimal recipe according to the solution configuration. When false (the default), Amazon Personalize uses recipeArn.
perform_hpobooleanWhether to perform hyperparameter optimization (HPO) on the chosen recipe. The default is false.
perform_incremental_updatebooleanWhether 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_arnstringThe ARN of the recipe used in the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
solution_arnstringThe ARN of the solution. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
solution_configobjectDescribes the configuration properties for the solution.
solution_version_arnstringThe ARN of the solution version. (pattern: <code>arn:([a-z\d-]+):personalize:.:.:.+</code>)
statusstringThe 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_hoursnumber (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_modestringThe 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_typestringWhether the solution version was created automatically or manually. (AUTOMATIC, MANUAL)
tuned_hpo_paramsobjectIf hyperparameter optimization was performed, contains the hyperparameter values of the best performing model.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_solution_versionselectregionDescribes a specific version of a solution. For more information on solutions, see CreateSolution
list_solution_versionsselectregionReturns 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_versioninsertregion, solutionArnTrains 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_creationexecregion, solutionVersionArnStops 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

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
;

INSERT examples

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
;

Lifecycle Methods

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 }}"
}'
;