Skip to content

Commit

Permalink
feat(client-personalize): This release provides support for the exclu…
Browse files Browse the repository at this point in the history
…sion of certain columns for training when creating a solution and creating or updating a recommender with Amazon Personalize.
  • Loading branch information
awstools committed May 30, 2023
1 parent 3da6dc1 commit a083178
Show file tree
Hide file tree
Showing 18 changed files with 1,006 additions and 647 deletions.
Expand Up @@ -41,11 +41,14 @@ export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __M
* and
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetPersonalizedRanking.html">GetPersonalizedRanking</a>
* APIs, a campaign is specified in the request.</p>
*
* <p>
* <b>Minimum Provisioned TPS and Auto-Scaling</b>
* </p>
*
* <important>
* <p> A high <code>minProvisionedTPS</code> will increase your bill. We recommend starting with 1 for <code>minProvisionedTPS</code> (the default). Track
* your usage using Amazon CloudWatch metrics, and increase the <code>minProvisionedTPS</code>
* as necessary.</p>
* </important>
* <p>A transaction is a single <code>GetRecommendations</code> or
* <code>GetPersonalizedRanking</code> call. Transactions per second (TPS) is the throughput
* and unit of billing for Amazon Personalize. The minimum provisioned TPS
Expand All @@ -63,7 +66,6 @@ export interface CreateCampaignCommandOutput extends CreateCampaignResponse, __M
* We recommend starting with a low <code>minProvisionedTPS</code>, track
* your usage using Amazon CloudWatch metrics, and then increase the <code>minProvisionedTPS</code>
* as necessary.</p>
*
* <p>
* <b>Status</b>
* </p>
Expand Down
Expand Up @@ -39,7 +39,6 @@ export interface CreateDatasetCommandOutput extends CreateDatasetResponse, __Met
* <p>Creates an empty dataset and adds it to the specified dataset group.
* Use <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDatasetImportJob.html">CreateDatasetImportJob</a> to import your training data to a
* dataset.</p>
*
* <p>There are three types of datasets:</p>
* <ul>
* <li>
Expand Down
Expand Up @@ -68,7 +68,6 @@ export interface CreateDatasetImportJobCommandOutput extends CreateDatasetImport
* <p>Importing takes time. You must wait until the status shows as ACTIVE
* before training a model using the dataset.</p>
* </note>
*
* <p class="title">
* <b>Related APIs</b>
* </p>
Expand Down
Expand Up @@ -41,11 +41,14 @@ export interface CreateRecommenderCommandOutput extends CreateRecommenderRespons
* <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html">GetRecommendations</a>
* request.
* </p>
*
* <p>
* <b>Minimum recommendation requests per second</b>
* </p>
*
* <important>
* <p>A high <code>minRecommendationRequestsPerSecond</code> will increase your bill. We recommend starting with 1 for <code>minRecommendationRequestsPerSecond</code> (the default). Track
* your usage using Amazon CloudWatch metrics, and increase the <code>minRecommendationRequestsPerSecond</code>
* as necessary.</p>
* </important>
* <p>When you create a recommender, you can configure the recommender's minimum recommendation requests per second. The minimum recommendation requests per second
* (<code>minRecommendationRequestsPerSecond</code>) specifies the baseline recommendation request throughput provisioned by
* Amazon Personalize. The default minRecommendationRequestsPerSecond is <code>1</code>. A recommendation request is a single <code>GetRecommendations</code> operation.
Expand All @@ -66,7 +69,6 @@ export interface CreateRecommenderCommandOutput extends CreateRecommenderRespons
* your usage using Amazon CloudWatch metrics, and then increase the <code>minRecommendationRequestsPerSecond</code>
* as necessary.
* </p>
*
* <p>
* <b>Status</b>
* </p>
Expand Down Expand Up @@ -127,6 +129,13 @@ export interface CreateRecommenderCommandOutput extends CreateRecommenderRespons
* "<keys>": "STRING_VALUE",
* },
* minRecommendationRequestsPerSecond: Number("int"),
* trainingDataConfig: { // TrainingDataConfig
* excludedDatasetColumns: { // ExcludedDatasetColumns
* "<keys>": [ // ColumnNamesList
* "STRING_VALUE",
* ],
* },
* },
* },
* tags: [ // Tags
* { // Tag
Expand Down
Expand Up @@ -42,7 +42,6 @@ export interface CreateSchemaCommandOutput extends CreateSchemaResponse, __Metad
* type and has a set of required field and keywords. If you are creating a schema for a dataset in a Domain dataset group, you
* provide the domain of the Domain dataset group.
* You specify a schema when you call <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>.</p>
*
* <p class="title">
* <b>Related APIs</b>
* </p>
Expand Down
16 changes: 9 additions & 7 deletions clients/client-personalize/src/commands/CreateSolutionCommand.ts
Expand Up @@ -37,7 +37,7 @@ export interface CreateSolutionCommandOutput extends CreateSolutionResponse, __M
/**
* @public
* <p>Creates the configuration for training a model. A trained model is known as
* a solution. After the configuration is created, you train the model (create a solution)
* a solution version. After the configuration is created, you train the model (create a solution version)
* by calling the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolutionVersion.html">CreateSolutionVersion</a> operation. Every time you call
* <code>CreateSolutionVersion</code>, a new version of the solution is created.</p>
* <p>After creating a solution version, you check its accuracy by calling
Expand All @@ -48,9 +48,7 @@ export interface CreateSolutionCommandOutput extends CreateSolutionResponse, __M
* <p>To train a model, Amazon Personalize requires training data and a recipe. The training data
* comes from the dataset group that you provide in the request. A recipe specifies
* the training algorithm and a feature transformation. You can specify one of the predefined
* recipes provided by Amazon Personalize. Alternatively, you can specify
* <code>performAutoML</code> and Amazon Personalize will analyze your data and select the
* optimum USER_PERSONALIZATION recipe for you.</p>
* recipes provided by Amazon Personalize. </p>
* <note>
* <p>Amazon Personalize doesn't support configuring the <code>hpoObjective</code>
* for solution hyperparameter optimization at this time.</p>
Expand All @@ -69,9 +67,6 @@ export interface CreateSolutionCommandOutput extends CreateSolutionResponse, __M
* </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>. Wait
* until the status shows as ACTIVE before calling <code>CreateSolutionVersion</code>.</p>
*
*
*
* <p class="title">
* <b>Related APIs</b>
* </p>
Expand Down Expand Up @@ -175,6 +170,13 @@ export interface CreateSolutionCommandOutput extends CreateSolutionResponse, __M
* itemAttribute: "STRING_VALUE",
* objectiveSensitivity: "LOW" || "MEDIUM" || "HIGH" || "OFF",
* },
* trainingDataConfig: { // TrainingDataConfig
* excludedDatasetColumns: { // ExcludedDatasetColumns
* "<keys>": [ // ColumnNamesList
* "STRING_VALUE",
* ],
* },
* },
* },
* tags: [ // Tags
* { // Tag
Expand Down
Expand Up @@ -76,6 +76,13 @@ export interface DescribeRecommenderCommandOutput extends DescribeRecommenderRes
* // "<keys>": "STRING_VALUE",
* // },
* // minRecommendationRequestsPerSecond: Number("int"),
* // trainingDataConfig: { // TrainingDataConfig
* // excludedDatasetColumns: { // ExcludedDatasetColumns
* // "<keys>": [ // ColumnNamesList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // },
* // creationDateTime: new Date("TIMESTAMP"),
* // lastUpdatedDateTime: new Date("TIMESTAMP"),
Expand All @@ -87,6 +94,13 @@ export interface DescribeRecommenderCommandOutput extends DescribeRecommenderRes
* // "<keys>": "STRING_VALUE",
* // },
* // minRecommendationRequestsPerSecond: Number("int"),
* // trainingDataConfig: {
* // excludedDatasetColumns: {
* // "<keys>": [
* // "STRING_VALUE",
* // ],
* // },
* // },
* // },
* // creationDateTime: new Date("TIMESTAMP"),
* // lastUpdatedDateTime: new Date("TIMESTAMP"),
Expand Down
Expand Up @@ -111,6 +111,13 @@ export interface DescribeSolutionCommandOutput extends DescribeSolutionResponse,
* // itemAttribute: "STRING_VALUE",
* // objectiveSensitivity: "LOW" || "MEDIUM" || "HIGH" || "OFF",
* // },
* // trainingDataConfig: { // TrainingDataConfig
* // excludedDatasetColumns: { // ExcludedDatasetColumns
* // "<keys>": [ // ColumnNamesList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // },
* // autoMLResult: { // AutoMLResult
* // bestRecipeArn: "STRING_VALUE",
Expand Down
Expand Up @@ -112,6 +112,13 @@ export interface DescribeSolutionVersionCommandOutput extends DescribeSolutionVe
* // itemAttribute: "STRING_VALUE",
* // objectiveSensitivity: "LOW" || "MEDIUM" || "HIGH" || "OFF",
* // },
* // trainingDataConfig: { // TrainingDataConfig
* // excludedDatasetColumns: { // ExcludedDatasetColumns
* // "<keys>": [ // ColumnNamesList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // },
* // trainingHours: Number("double"),
* // trainingMode: "FULL" || "UPDATE",
Expand Down
Expand Up @@ -65,6 +65,13 @@ export interface ListRecommendersCommandOutput extends ListRecommendersResponse,
* // "<keys>": "STRING_VALUE",
* // },
* // minRecommendationRequestsPerSecond: Number("int"),
* // trainingDataConfig: { // TrainingDataConfig
* // excludedDatasetColumns: { // ExcludedDatasetColumns
* // "<keys>": [ // ColumnNamesList
* // "STRING_VALUE",
* // ],
* // },
* // },
* // },
* // status: "STRING_VALUE",
* // creationDateTime: new Date("TIMESTAMP"),
Expand Down
Expand Up @@ -36,7 +36,7 @@ export interface ListTagsForResourceCommandOutput extends ListTagsForResourceRes

/**
* @public
* <p>Get a list of <a href="https://docs.aws.amazon.com/personalize/latest/dev/tagging-resources.html">tags</a> attached to a resource.</p>
* <p>Get a list of <a href="https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html">tags</a> attached to a resource.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -36,7 +36,7 @@ export interface UntagResourceCommandOutput extends UntagResourceResponse, __Met

/**
* @public
* <p>Remove <a href="https://docs.aws.amazon.com/personalize/latest/dev/tagging-resources.html">tags</a> that are attached to a resource.</p>
* <p>Remove <a href="https://docs.aws.amazon.com/personalize/latest/dg/tagging-resources.html">tags</a> that are attached to a resource.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Expand Up @@ -40,13 +40,11 @@ export interface UpdateCampaignCommandOutput extends UpdateCampaignResponse, __M
* campaign's <code>minProvisionedTPS</code> parameter.</p>
* <p>To update a campaign, the campaign status must be ACTIVE or CREATE FAILED.
* Check the campaign status using the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeCampaign.html">DescribeCampaign</a> operation.</p>
*
* <note>
* <p>You can still get recommendations from a campaign while an update is in progress.
* The campaign will use the previous solution version and campaign configuration to generate recommendations until the latest campaign update status is <code>Active</code>.
* </p>
* </note>
*
* <p>For more information on campaigns, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateCampaign.html">CreateCampaign</a>.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
Expand Down
Expand Up @@ -36,7 +36,14 @@ export interface UpdateRecommenderCommandOutput extends UpdateRecommenderRespons

/**
* @public
* <p>Updates the recommender to modify the recommender configuration.</p>
* <p>Updates the recommender to modify the recommender configuration.
* If you update the recommender to modify the columns used in training, Amazon Personalize automatically starts a full retraining of
* the models backing your recommender. While the update completes, you can still get recommendations from the recommender. The recommender
* uses the previous configuration until the update completes.
* To track the status of this update,
* use the <code>latestRecommenderUpdate</code> returned in the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_DescribeRecommender.html">DescribeRecommender</a>
* operation.
* </p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand All @@ -50,6 +57,13 @@ export interface UpdateRecommenderCommandOutput extends UpdateRecommenderRespons
* "<keys>": "STRING_VALUE",
* },
* minRecommendationRequestsPerSecond: Number("int"),
* trainingDataConfig: { // TrainingDataConfig
* excludedDatasetColumns: { // ExcludedDatasetColumns
* "<keys>": [ // ColumnNamesList
* "STRING_VALUE",
* ],
* },
* },
* },
* };
* const command = new UpdateRecommenderCommand(input);
Expand Down
35 changes: 18 additions & 17 deletions clients/client-personalize/src/endpoint/ruleset.ts
Expand Up @@ -6,24 +6,25 @@ import { RuleSetObject } from "@aws-sdk/util-endpoints";
or see "smithy.rules#endpointRuleSet"
in codegen/sdk-codegen/aws-models/personalize.json */

const p="required",
q="fn",
r="argv",
s="ref";
const a="PartitionResult",
const q="required",
r="fn",
s="argv",
t="ref";
const a="isSet",
b="tree",
c="error",
d="endpoint",
e={[p]:false,"type":"String"},
f={[p]:true,"default":false,"type":"Boolean"},
g={[s]:"Endpoint"},
h={[q]:"booleanEquals",[r]:[{[s]:"UseFIPS"},true]},
i={[q]:"booleanEquals",[r]:[{[s]:"UseDualStack"},true]},
j={},
k={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsFIPS"]}]},
l={[q]:"booleanEquals",[r]:[true,{[q]:"getAttr",[r]:[{[s]:a},"supportsDualStack"]}]},
m=[g],
n=[h],
o=[i];
const _data={version:"1.0",parameters:{Region:e,UseDualStack:f,UseFIPS:f,Endpoint:e},rules:[{conditions:[{[q]:"aws.partition",[r]:[{[s]:"Region"}],assign:a}],type:b,rules:[{conditions:[{[q]:"isSet",[r]:m},{[q]:"parseURL",[r]:m,assign:"url"}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:g,properties:j,headers:j},type:d}]}]},{conditions:[h,i],type:b,rules:[{conditions:[k,l],type:b,rules:[{endpoint:{url:"https://personalize-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[k],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://personalize-fips.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[l],type:b,rules:[{endpoint:{url:"https://personalize.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:j,headers:j},type:d}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{endpoint:{url:"https://personalize.{Region}.{PartitionResult#dnsSuffix}",properties:j,headers:j},type:d}]}]};
e="PartitionResult",
f={[q]:false,"type":"String"},
g={[q]:true,"default":false,"type":"Boolean"},
h={[t]:"Endpoint"},
i={[r]:"booleanEquals",[s]:[{[t]:"UseFIPS"},true]},
j={[r]:"booleanEquals",[s]:[{[t]:"UseDualStack"},true]},
k={},
l={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsFIPS"]}]},
m={[r]:"booleanEquals",[s]:[true,{[r]:"getAttr",[s]:[{[t]:e},"supportsDualStack"]}]},
n=[i],
o=[j],
p=[{[t]:"Region"}];
const _data={version:"1.0",parameters:{Region:f,UseDualStack:g,UseFIPS:g,Endpoint:f},rules:[{conditions:[{[r]:a,[s]:[h]}],type:b,rules:[{conditions:n,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:c},{type:b,rules:[{conditions:o,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:c},{endpoint:{url:h,properties:k,headers:k},type:d}]}]},{type:b,rules:[{conditions:[{[r]:a,[s]:p}],type:b,rules:[{conditions:[{[r]:"aws.partition",[s]:p,assign:e}],type:b,rules:[{conditions:[i,j],type:b,rules:[{conditions:[l,m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://personalize-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:c}]},{conditions:n,type:b,rules:[{conditions:[l],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://personalize-fips.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"FIPS is enabled but this partition does not support FIPS",type:c}]},{conditions:o,type:b,rules:[{conditions:[m],type:b,rules:[{type:b,rules:[{endpoint:{url:"https://personalize.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:k,headers:k},type:d}]}]},{error:"DualStack is enabled but this partition does not support DualStack",type:c}]},{type:b,rules:[{endpoint:{url:"https://personalize.{Region}.{PartitionResult#dnsSuffix}",properties:k,headers:k},type:d}]}]}]},{error:"Invalid Configuration: Missing Region",type:c}]}]};
export const ruleSet: RuleSetObject = _data;

0 comments on commit a083178

Please sign in to comment.