Skip to content

Commit 6e69620

Browse files
Add support for eventsConfig for CreateSolution, UpdateSolution, DescribeSolution, DescribeSolutionVersion. Add support for GetSolutionMetrics to return weighted NDCG metrics when eventsConfig is enabled for the solution.
1 parent 43c925e commit 6e69620

24 files changed

+750
-21
lines changed

generator/ServiceModels/personalize/personalize-2018-05-22.api.json

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,8 @@
13111311
},
13121312
"ColumnName":{
13131313
"type":"string",
1314-
"max":150
1314+
"max":150,
1315+
"pattern":"[A-Za-z_][A-Za-z\\d_]*"
13151316
},
13161317
"ColumnNamesList":{
13171318
"type":"list",
@@ -2228,6 +2229,19 @@
22282229
]
22292230
},
22302231
"ErrorMessage":{"type":"string"},
2232+
"EventParameters":{
2233+
"type":"structure",
2234+
"members":{
2235+
"eventType":{"shape":"EventType"},
2236+
"eventValueThreshold":{"shape":"EventTypeThresholdValue"},
2237+
"weight":{"shape":"EventTypeWeight"}
2238+
}
2239+
},
2240+
"EventParametersList":{
2241+
"type":"list",
2242+
"member":{"shape":"EventParameters"},
2243+
"max":10
2244+
},
22312245
"EventTracker":{
22322246
"type":"structure",
22332247
"members":{
@@ -2260,10 +2274,22 @@
22602274
"type":"string",
22612275
"max":256
22622276
},
2277+
"EventTypeThresholdValue":{"type":"double"},
2278+
"EventTypeWeight":{
2279+
"type":"double",
2280+
"max":1,
2281+
"min":0
2282+
},
22632283
"EventValueThreshold":{
22642284
"type":"string",
22652285
"max":256
22662286
},
2287+
"EventsConfig":{
2288+
"type":"structure",
2289+
"members":{
2290+
"eventParametersList":{"shape":"EventParametersList"}
2291+
}
2292+
},
22672293
"ExcludedDatasetColumns":{
22682294
"type":"map",
22692295
"key":{"shape":"DatasetType"},
@@ -3032,6 +3058,7 @@
30323058
"algorithmHyperParameters":{"shape":"HyperParameters"},
30333059
"featureTransformationParameters":{"shape":"FeatureTransformationParameters"},
30343060
"autoMLConfig":{"shape":"AutoMLConfig"},
3061+
"eventsConfig":{"shape":"EventsConfig"},
30353062
"optimizationObjective":{"shape":"OptimizationObjective"},
30363063
"trainingDataConfig":{"shape":"TrainingDataConfig"},
30373064
"autoTrainingConfig":{"shape":"AutoTrainingConfig"}
@@ -3051,7 +3078,8 @@
30513078
"SolutionUpdateConfig":{
30523079
"type":"structure",
30533080
"members":{
3054-
"autoTrainingConfig":{"shape":"AutoTrainingConfig"}
3081+
"autoTrainingConfig":{"shape":"AutoTrainingConfig"},
3082+
"eventsConfig":{"shape":"EventsConfig"}
30553083
}
30563084
},
30573085
"SolutionUpdateSummary":{
@@ -3161,7 +3189,8 @@
31613189
"type":"string",
31623190
"max":128,
31633191
"min":1,
3164-
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
3192+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
3193+
"sensitive":true
31653194
},
31663195
"TagKeys":{
31673196
"type":"list",
@@ -3189,7 +3218,8 @@
31893218
"type":"string",
31903219
"max":256,
31913220
"min":0,
3192-
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
3221+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
3222+
"sensitive":true
31933223
},
31943224
"Tags":{
31953225
"type":"list",

generator/ServiceModels/personalize/personalize-2018-05-22.docs.json

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"CreateSolution": "<important> <p>By default, all new solutions use automatic training. With automatic training, you incur training costs while your solution is active. To avoid unnecessary costs, when you are finished you can <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateSolution.html\">update the solution</a> to turn off automatic training. For information about training costs, see <a href=\"https://aws.amazon.com/personalize/pricing/\">Amazon Personalize pricing</a>.</p> </important> <p>Creates the configuration for training a model (creating a solution version). This configuration includes the recipe to use for model training and optional training configuration, such as columns to use in training and feature transformation parameters. For more information about configuring a solution, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/customizing-solution-config.html\">Creating and configuring a solution</a>. </p> <p> By default, new solutions use automatic training to create solution versions every 7 days. You can change the training frequency. Automatic solution version creation starts within one hour after the solution is ACTIVE. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/solution-config-auto-training.html\">Configuring automatic training</a>.</p> <p> To turn off automatic training, set <code>performAutoTraining</code> to false. If you turn off automatic training, you must manually create a solution version by calling the <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolutionVersion.html\">CreateSolutionVersion</a> operation.</p> <p>After training starts, you can get the solution version's Amazon Resource Name (ARN) with the <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html\">ListSolutionVersions</a> API operation. To get its status, use the <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html\">DescribeSolutionVersion</a>. </p> <p>After training completes you can evaluate model accuracy by calling <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_GetSolutionMetrics.html\">GetSolutionMetrics</a>. When you are satisfied with the solution version, you deploy it using <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateCampaign.html\">CreateCampaign</a>. The campaign provides recommendations to a client through the <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html\">GetRecommendations</a> API.</p> <note> <p>Amazon Personalize doesn't support configuring the <code>hpoObjective</code> for solution hyperparameter optimization at this time.</p> </note> <p> <b>Status</b> </p> <p>A solution can be in one of the following states:</p> <ul> <li> <p>CREATE PENDING &gt; CREATE IN_PROGRESS &gt; ACTIVE -or- CREATE FAILED</p> </li> <li> <p>DELETE PENDING &gt; DELETE IN_PROGRESS</p> </li> </ul> <p>To get the status of the solution, call <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolution.html\">DescribeSolution</a>. If you use manual training, the status must be ACTIVE before you call <code>CreateSolutionVersion</code>.</p> <p class=\"title\"> <b>Related APIs</b> </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_UpdateSolution.html\">UpdateSolution</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutions.html\">ListSolutions</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolutionVersion.html\">CreateSolutionVersion</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolution.html\">DescribeSolution</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteSolution.html\">DeleteSolution</a> </p> </li> </ul> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html\">ListSolutionVersions</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html\">DescribeSolutionVersion</a> </p> </li> </ul>",
1919
"CreateSolutionVersion": "<p>Trains or retrains an active solution in a Custom dataset group. A solution is created using the <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html\">CreateSolution</a> operation and must be in the ACTIVE state before calling <code>CreateSolutionVersion</code>. A new version of the solution is created every time you call this operation.</p> <p> <b>Status</b> </p> <p>A solution version can be in one of the following states:</p> <ul> <li> <p>CREATE PENDING</p> </li> <li> <p>CREATE IN_PROGRESS</p> </li> <li> <p>ACTIVE</p> </li> <li> <p>CREATE FAILED</p> </li> <li> <p>CREATE STOPPING</p> </li> <li> <p>CREATE STOPPED</p> </li> </ul> <p>To get the status of the version, call <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html\">DescribeSolutionVersion</a>. Wait until the status shows as ACTIVE before calling <code>CreateCampaign</code>.</p> <p>If the status shows as CREATE FAILED, the response includes a <code>failureReason</code> key, which describes why the job failed.</p> <p class=\"title\"> <b>Related APIs</b> </p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutionVersions.html\">ListSolutionVersions</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolutionVersion.html\">DescribeSolutionVersion</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_ListSolutions.html\">ListSolutions</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html\">CreateSolution</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeSolution.html\">DescribeSolution</a> </p> </li> <li> <p> <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_DeleteSolution.html\">DeleteSolution</a> </p> </li> </ul>",
2020
"DeleteCampaign": "<p>Removes a campaign by deleting the solution deployment. The solution that the campaign is based on is not deleted and can be redeployed when needed. A deleted campaign can no longer be specified in a <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html\">GetRecommendations</a> request. For information on creating campaigns, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateCampaign.html\">CreateCampaign</a>.</p>",
21-
"DeleteDataset": "<p>Deletes a dataset. You can't delete a dataset if an associated <code>DatasetImportJob</code> or <code>SolutionVersion</code> is in the CREATE PENDING or IN PROGRESS state. For more information on datasets, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html\">CreateDataset</a>.</p>",
21+
"DeleteDataset": "<p>Deletes a dataset. You can't delete a dataset if an associated <code>DatasetImportJob</code> or <code>SolutionVersion</code> is in the CREATE PENDING or IN PROGRESS state. For more information about deleting datasets, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/delete-dataset.html\">Deleting a dataset</a>. </p>",
2222
"DeleteDatasetGroup": "<p>Deletes a dataset group. Before you delete a dataset group, you must delete the following:</p> <ul> <li> <p>All associated event trackers.</p> </li> <li> <p>All associated solutions.</p> </li> <li> <p>All datasets in the dataset group.</p> </li> </ul>",
2323
"DeleteEventTracker": "<p>Deletes the event tracker. Does not delete the dataset from the dataset group. For more information on event trackers, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateEventTracker.html\">CreateEventTracker</a>.</p>",
2424
"DeleteFilter": "<p>Deletes a filter.</p>",
@@ -1153,6 +1153,18 @@
11531153
"TooManyTagsException$message": null
11541154
}
11551155
},
1156+
"EventParameters": {
1157+
"base": "<p>Describes the parameters of events, which are used in solution creation.</p>",
1158+
"refs": {
1159+
"EventParametersList$member": null
1160+
}
1161+
},
1162+
"EventParametersList": {
1163+
"base": null,
1164+
"refs": {
1165+
"EventsConfig$eventParametersList": "<p>A list of event parameters, which includes event types and their event value thresholds and weights.</p>"
1166+
}
1167+
},
11561168
"EventTracker": {
11571169
"base": "<p>Provides information about an event tracker.</p>",
11581170
"refs": {
@@ -1175,17 +1187,37 @@
11751187
"base": null,
11761188
"refs": {
11771189
"CreateSolutionRequest$eventType": "<p>When your have multiple event types (using an <code>EVENT_TYPE</code> schema field), this parameter specifies which event type (for example, 'click' or 'like') is used for training the model.</p> <p>If you do not provide an <code>eventType</code>, Amazon Personalize will use all interactions for training with equal weight regardless of type.</p>",
1190+
"EventParameters$eventType": "<p>The name of the event type to be considered for solution creation.</p>",
11781191
"MetricAttribute$eventType": "<p>The metric's event type.</p>",
11791192
"Solution$eventType": "<p>The event type (for example, 'click' or 'like') that is used for training the model. If no <code>eventType</code> is provided, Amazon Personalize uses all interactions for training with equal weight regardless of type.</p>",
11801193
"SolutionVersion$eventType": "<p>The event type (for example, 'click' or 'like') that is used for training the model.</p>"
11811194
}
11821195
},
1196+
"EventTypeThresholdValue": {
1197+
"base": null,
1198+
"refs": {
1199+
"EventParameters$eventValueThreshold": "<p>The threshold of the event type. Only events with a value greater or equal to this threshold will be considered for solution creation.</p>"
1200+
}
1201+
},
1202+
"EventTypeWeight": {
1203+
"base": null,
1204+
"refs": {
1205+
"EventParameters$weight": "<p>The weight of the event type. A higher weight means higher importance of the event type for the created solution.</p>"
1206+
}
1207+
},
11831208
"EventValueThreshold": {
11841209
"base": null,
11851210
"refs": {
11861211
"SolutionConfig$eventValueThreshold": "<p>Only events with a value greater than or equal to this threshold are used for training a model.</p>"
11871212
}
11881213
},
1214+
"EventsConfig": {
1215+
"base": "<p>Describes the configuration of events, which are used in solution creation.</p>",
1216+
"refs": {
1217+
"SolutionConfig$eventsConfig": "<p>Describes the configuration of an event, which includes a list of event parameters. You can specify up to 10 event parameters. Events are used in solution creation.</p>",
1218+
"SolutionUpdateConfig$eventsConfig": "<p>Describes the configuration of an event, which includes a list of event parameters. You can specify up to 10 event parameters. Events are used in solution creation.</p>"
1219+
}
1220+
},
11891221
"ExcludedDatasetColumns": {
11901222
"base": null,
11911223
"refs": {

generator/ServiceModels/personalize/personalize-2018-05-22.normal.json

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@
311311
{"shape":"ResourceNotFoundException"},
312312
{"shape":"ResourceInUseException"}
313313
],
314-
"documentation":"<p>Deletes a dataset. You can't delete a dataset if an associated <code>DatasetImportJob</code> or <code>SolutionVersion</code> is in the CREATE PENDING or IN PROGRESS state. For more information on datasets, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html\">CreateDataset</a>.</p>",
314+
"documentation":"<p>Deletes a dataset. You can't delete a dataset if an associated <code>DatasetImportJob</code> or <code>SolutionVersion</code> is in the CREATE PENDING or IN PROGRESS state. For more information about deleting datasets, see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/delete-dataset.html\">Deleting a dataset</a>. </p>",
315315
"idempotent":true
316316
},
317317
"DeleteDatasetGroup":{
@@ -1662,7 +1662,8 @@
16621662
},
16631663
"ColumnName":{
16641664
"type":"string",
1665-
"max":150
1665+
"max":150,
1666+
"pattern":"[A-Za-z_][A-Za-z\\d_]*"
16661667
},
16671668
"ColumnNamesList":{
16681669
"type":"list",
@@ -3385,6 +3386,29 @@
33853386
]
33863387
},
33873388
"ErrorMessage":{"type":"string"},
3389+
"EventParameters":{
3390+
"type":"structure",
3391+
"members":{
3392+
"eventType":{
3393+
"shape":"EventType",
3394+
"documentation":"<p>The name of the event type to be considered for solution creation.</p>"
3395+
},
3396+
"eventValueThreshold":{
3397+
"shape":"EventTypeThresholdValue",
3398+
"documentation":"<p>The threshold of the event type. Only events with a value greater or equal to this threshold will be considered for solution creation.</p>"
3399+
},
3400+
"weight":{
3401+
"shape":"EventTypeWeight",
3402+
"documentation":"<p>The weight of the event type. A higher weight means higher importance of the event type for the created solution.</p>"
3403+
}
3404+
},
3405+
"documentation":"<p>Describes the parameters of events, which are used in solution creation.</p>"
3406+
},
3407+
"EventParametersList":{
3408+
"type":"list",
3409+
"member":{"shape":"EventParameters"},
3410+
"max":10
3411+
},
33883412
"EventTracker":{
33893413
"type":"structure",
33903414
"members":{
@@ -3458,10 +3482,26 @@
34583482
"type":"string",
34593483
"max":256
34603484
},
3485+
"EventTypeThresholdValue":{"type":"double"},
3486+
"EventTypeWeight":{
3487+
"type":"double",
3488+
"max":1,
3489+
"min":0
3490+
},
34613491
"EventValueThreshold":{
34623492
"type":"string",
34633493
"max":256
34643494
},
3495+
"EventsConfig":{
3496+
"type":"structure",
3497+
"members":{
3498+
"eventParametersList":{
3499+
"shape":"EventParametersList",
3500+
"documentation":"<p>A list of event parameters, which includes event types and their event value thresholds and weights.</p>"
3501+
}
3502+
},
3503+
"documentation":"<p>Describes the configuration of events, which are used in solution creation.</p>"
3504+
},
34653505
"ExcludedDatasetColumns":{
34663506
"type":"map",
34673507
"key":{"shape":"DatasetType"},
@@ -4888,6 +4928,10 @@
48884928
"shape":"AutoMLConfig",
48894929
"documentation":"<p>The <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/API_AutoMLConfig.html\">AutoMLConfig</a> object containing a list of recipes to search when AutoML is performed.</p>"
48904930
},
4931+
"eventsConfig":{
4932+
"shape":"EventsConfig",
4933+
"documentation":"<p>Describes the configuration of an event, which includes a list of event parameters. You can specify up to 10 event parameters. Events are used in solution creation.</p>"
4934+
},
48914935
"optimizationObjective":{
48924936
"shape":"OptimizationObjective",
48934937
"documentation":"<p>Describes the additional objective for the solution, such as maximizing streaming minutes or increasing revenue. For more information see <a href=\"https://docs.aws.amazon.com/personalize/latest/dg/optimizing-solution-for-objective.html\">Optimizing a solution</a>.</p>"
@@ -4936,7 +4980,11 @@
49364980
"SolutionUpdateConfig":{
49374981
"type":"structure",
49384982
"members":{
4939-
"autoTrainingConfig":{"shape":"AutoTrainingConfig"}
4983+
"autoTrainingConfig":{"shape":"AutoTrainingConfig"},
4984+
"eventsConfig":{
4985+
"shape":"EventsConfig",
4986+
"documentation":"<p>Describes the configuration of an event, which includes a list of event parameters. You can specify up to 10 event parameters. Events are used in solution creation.</p>"
4987+
}
49404988
},
49414989
"documentation":"<p>The configuration details of the solution update.</p>"
49424990
},
@@ -5162,7 +5210,8 @@
51625210
"type":"string",
51635211
"max":128,
51645212
"min":1,
5165-
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
5213+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
5214+
"sensitive":true
51665215
},
51675216
"TagKeys":{
51685217
"type":"list",
@@ -5196,7 +5245,8 @@
51965245
"type":"string",
51975246
"max":256,
51985247
"min":0,
5199-
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
5248+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$",
5249+
"sensitive":true
52005250
},
52015251
"Tags":{
52025252
"type":"list",

sdk/code-analysis/ServiceAnalysis/Personalize/Generated/PropertyValueRules.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,15 @@
13531353
<property>Amazon.Personalize.Model.DefaultIntegerHyperParameterRange.Name</property>
13541354
<max>256</max>
13551355
</property-value-rule>
1356+
<property-value-rule>
1357+
<property>Amazon.Personalize.Model.EventParameters.EventType</property>
1358+
<max>256</max>
1359+
</property-value-rule>
1360+
<property-value-rule>
1361+
<property>Amazon.Personalize.Model.EventParameters.Weight</property>
1362+
<min>0</min>
1363+
<max>1</max>
1364+
</property-value-rule>
13561365
<property-value-rule>
13571366
<property>Amazon.Personalize.Model.EventTracker.AccountId</property>
13581367
<max>256</max>
@@ -1414,6 +1423,7 @@
14141423
<property-value-rule>
14151424
<property>Amazon.Personalize.Model.FieldsForThemeGeneration.ItemName</property>
14161425
<max>150</max>
1426+
<pattern>[A-Za-z_][A-Za-z\d_]*</pattern>
14171427
</property-value-rule>
14181428
<property-value-rule>
14191429
<property>Amazon.Personalize.Model.Filter.DatasetGroupArn</property>

0 commit comments

Comments
 (0)