Skip to content

Commit

Permalink
feat(client-sagemaker): Adding support for timeseries forecasting in …
Browse files Browse the repository at this point in the history
…the CreateAutoMLJobV2 API.
  • Loading branch information
awstools committed Jun 29, 2023
1 parent 03a2f9a commit 1c2f6f0
Show file tree
Hide file tree
Showing 20 changed files with 1,267 additions and 452 deletions.
Expand Up @@ -76,7 +76,7 @@ export interface CreateAutoMLJobCommandOutput extends CreateAutoMLJobResponse, _
* },
* ProblemType: "BinaryClassification" || "MulticlassClassification" || "Regression",
* AutoMLJobObjective: { // AutoMLJobObjective
* MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* },
* AutoMLJobConfig: { // AutoMLJobConfig
* CompletionCriteria: { // AutoMLJobCompletionCriteria
Expand Down
39 changes: 35 additions & 4 deletions clients/client-sagemaker/src/commands/CreateAutoMLJobV2Command.ts
Expand Up @@ -42,9 +42,9 @@ export interface CreateAutoMLJobV2CommandOutput extends CreateAutoMLJobV2Respons
* <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJobV2.html">CreateAutoMLJobV2</a> and <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJobV2.html">DescribeAutoMLJobV2</a> are new versions of <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateAutoMLJob.html">CreateAutoMLJob</a>
* and <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_DescribeAutoMLJob.html">DescribeAutoMLJob</a> which offer backward compatibility.</p>
* <p>
* <code>CreateAutoMLJobV2</code> can manage tabular problem types identical to those of its previous version
* <code>CreateAutoMLJob</code>, as well as non-tabular problem types such as
* image or text classification.</p>
* <code>CreateAutoMLJobV2</code> can manage tabular problem types identical to those of
* its previous version <code>CreateAutoMLJob</code>, as well as non-tabular problem types
* such as image or text classification.</p>
* <p>Find guidelines about how to migrate a <code>CreateAutoMLJob</code> to
* <code>CreateAutoMLJobV2</code> in <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/autopilot-automate-model-development-create-experiment-api.html#autopilot-create-experiment-api-migrate-v1-v2">Migrate a CreateAutoMLJob to CreateAutoMLJobV2</a>.</p>
* </note>
Expand Down Expand Up @@ -115,6 +115,37 @@ export interface CreateAutoMLJobV2CommandOutput extends CreateAutoMLJobV2Respons
* TargetAttributeName: "STRING_VALUE", // required
* SampleWeightAttributeName: "STRING_VALUE",
* },
* TimeSeriesForecastingJobConfig: { // TimeSeriesForecastingJobConfig
* FeatureSpecificationS3Uri: "STRING_VALUE",
* CompletionCriteria: {
* MaxCandidates: Number("int"),
* MaxRuntimePerTrainingJobInSeconds: Number("int"),
* MaxAutoMLJobRuntimeInSeconds: Number("int"),
* },
* ForecastFrequency: "STRING_VALUE", // required
* ForecastHorizon: Number("int"), // required
* ForecastQuantiles: [ // ForecastQuantiles
* "STRING_VALUE",
* ],
* Transformations: { // TimeSeriesTransformations
* Filling: { // FillingTransformations
* "<keys>": { // FillingTransformationMap
* "<keys>": "STRING_VALUE",
* },
* },
* Aggregation: { // AggregationTransformations
* "<keys>": "sum" || "avg" || "first" || "min" || "max",
* },
* },
* TimeSeriesConfig: { // TimeSeriesConfig
* TargetAttributeName: "STRING_VALUE", // required
* TimestampAttributeName: "STRING_VALUE", // required
* ItemIdentifierAttributeName: "STRING_VALUE", // required
* GroupingAttributeNames: [ // GroupingAttributeNames
* "STRING_VALUE",
* ],
* },
* },
* },
* RoleArn: "STRING_VALUE", // required
* Tags: [ // TagList
Expand All @@ -136,7 +167,7 @@ export interface CreateAutoMLJobV2CommandOutput extends CreateAutoMLJobV2Respons
* },
* },
* AutoMLJobObjective: { // AutoMLJobObjective
* MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* },
* ModelDeployConfig: { // ModelDeployConfig
* AutoGenerateEndpointName: true || false,
Expand Down
3 changes: 2 additions & 1 deletion clients/client-sagemaker/src/commands/DeleteImageCommand.ts
Expand Up @@ -13,7 +13,8 @@ import {
SerdeContext as __SerdeContext,
} from "@smithy/types";

import { DeleteImageRequest, DeleteImageResponse } from "../models/models_1";
import { DeleteImageRequest } from "../models/models_1";
import { DeleteImageResponse } from "../models/models_2";
import { de_DeleteImageCommand, se_DeleteImageCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Expand Up @@ -13,7 +13,7 @@ import {
SerdeContext as __SerdeContext,
} from "@smithy/types";

import { DeleteImageVersionRequest, DeleteImageVersionResponse } from "../models/models_1";
import { DeleteImageVersionRequest, DeleteImageVersionResponse } from "../models/models_2";
import { de_DeleteImageVersionCommand, se_DeleteImageVersionCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Expand Up @@ -13,7 +13,7 @@ import {
SerdeContext as __SerdeContext,
} from "@smithy/types";

import { DeleteInferenceExperimentRequest, DeleteInferenceExperimentResponse } from "../models/models_1";
import { DeleteInferenceExperimentRequest, DeleteInferenceExperimentResponse } from "../models/models_2";
import { de_DeleteInferenceExperimentCommand, se_DeleteInferenceExperimentCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Expand Up @@ -76,7 +76,7 @@ export interface DescribeAutoMLJobCommandOutput extends DescribeAutoMLJobRespons
* // },
* // RoleArn: "STRING_VALUE", // required
* // AutoMLJobObjective: { // AutoMLJobObjective
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* // },
* // ProblemType: "BinaryClassification" || "MulticlassClassification" || "Regression",
* // AutoMLJobConfig: { // AutoMLJobConfig
Expand Down Expand Up @@ -125,9 +125,9 @@ export interface DescribeAutoMLJobCommandOutput extends DescribeAutoMLJobRespons
* // CandidateName: "STRING_VALUE", // required
* // FinalAutoMLJobObjectiveMetric: { // FinalAutoMLJobObjectiveMetric
* // Type: "Maximize" || "Minimize",
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* // Value: Number("float"), // required
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro",
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss",
* // },
* // ObjectiveStatus: "Succeeded" || "Pending" || "Failed", // required
* // CandidateSteps: [ // CandidateSteps // required
Expand Down Expand Up @@ -155,13 +155,14 @@ export interface DescribeAutoMLJobCommandOutput extends DescribeAutoMLJobRespons
* // CandidateArtifactLocations: { // CandidateArtifactLocations
* // Explainability: "STRING_VALUE", // required
* // ModelInsights: "STRING_VALUE",
* // BacktestResults: "STRING_VALUE",
* // },
* // CandidateMetrics: [ // MetricDataList
* // { // MetricDatum
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro",
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss",
* // Value: Number("float"),
* // Set: "Train" || "Validation" || "Test",
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "LogLoss" || "InferenceLatency",
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "LogLoss" || "InferenceLatency" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss",
* // },
* // ],
* // },
Expand All @@ -178,15 +179,15 @@ export interface DescribeAutoMLJobCommandOutput extends DescribeAutoMLJobRespons
* // },
* // },
* // AutoMLJobStatus: "Completed" || "InProgress" || "Failed" || "Stopped" || "Stopping", // required
* // AutoMLJobSecondaryStatus: "Starting" || "AnalyzingData" || "FeatureEngineering" || "ModelTuning" || "MaxCandidatesReached" || "Failed" || "Stopped" || "MaxAutoMLJobRuntimeReached" || "Stopping" || "CandidateDefinitionsGenerated" || "GeneratingExplainabilityReport" || "Completed" || "ExplainabilityError" || "DeployingModel" || "ModelDeploymentError" || "GeneratingModelInsightsReport" || "ModelInsightsError" || "TrainingModels", // required
* // AutoMLJobSecondaryStatus: "Starting" || "AnalyzingData" || "FeatureEngineering" || "ModelTuning" || "MaxCandidatesReached" || "Failed" || "Stopped" || "MaxAutoMLJobRuntimeReached" || "Stopping" || "CandidateDefinitionsGenerated" || "GeneratingExplainabilityReport" || "Completed" || "ExplainabilityError" || "DeployingModel" || "ModelDeploymentError" || "GeneratingModelInsightsReport" || "ModelInsightsError" || "TrainingModels" || "PreTraining", // required
* // GenerateCandidateDefinitionsOnly: true || false,
* // AutoMLJobArtifacts: { // AutoMLJobArtifacts
* // CandidateDefinitionNotebookLocation: "STRING_VALUE",
* // DataExplorationNotebookLocation: "STRING_VALUE",
* // },
* // ResolvedAttributes: { // ResolvedAttributes
* // AutoMLJobObjective: {
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* // },
* // ProblemType: "BinaryClassification" || "MulticlassClassification" || "Regression",
* // CompletionCriteria: {
Expand Down
Expand Up @@ -71,7 +71,7 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // },
* // RoleArn: "STRING_VALUE", // required
* // AutoMLJobObjective: { // AutoMLJobObjective
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* // },
* // AutoMLProblemTypeConfig: { // AutoMLProblemTypeConfig Union: only one key present
* // ImageClassificationJobConfig: { // ImageClassificationJobConfig
Expand Down Expand Up @@ -112,6 +112,37 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // TargetAttributeName: "STRING_VALUE", // required
* // SampleWeightAttributeName: "STRING_VALUE",
* // },
* // TimeSeriesForecastingJobConfig: { // TimeSeriesForecastingJobConfig
* // FeatureSpecificationS3Uri: "STRING_VALUE",
* // CompletionCriteria: {
* // MaxCandidates: Number("int"),
* // MaxRuntimePerTrainingJobInSeconds: Number("int"),
* // MaxAutoMLJobRuntimeInSeconds: Number("int"),
* // },
* // ForecastFrequency: "STRING_VALUE", // required
* // ForecastHorizon: Number("int"), // required
* // ForecastQuantiles: [ // ForecastQuantiles
* // "STRING_VALUE",
* // ],
* // Transformations: { // TimeSeriesTransformations
* // Filling: { // FillingTransformations
* // "<keys>": { // FillingTransformationMap
* // "<keys>": "STRING_VALUE",
* // },
* // },
* // Aggregation: { // AggregationTransformations
* // "<keys>": "sum" || "avg" || "first" || "min" || "max",
* // },
* // },
* // TimeSeriesConfig: { // TimeSeriesConfig
* // TargetAttributeName: "STRING_VALUE", // required
* // TimestampAttributeName: "STRING_VALUE", // required
* // ItemIdentifierAttributeName: "STRING_VALUE", // required
* // GroupingAttributeNames: [ // GroupingAttributeNames
* // "STRING_VALUE",
* // ],
* // },
* // },
* // },
* // CreationTime: new Date("TIMESTAMP"), // required
* // EndTime: new Date("TIMESTAMP"),
Expand All @@ -126,9 +157,9 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // CandidateName: "STRING_VALUE", // required
* // FinalAutoMLJobObjectiveMetric: { // FinalAutoMLJobObjectiveMetric
* // Type: "Maximize" || "Minimize",
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* // Value: Number("float"), // required
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro",
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss",
* // },
* // ObjectiveStatus: "Succeeded" || "Pending" || "Failed", // required
* // CandidateSteps: [ // CandidateSteps // required
Expand Down Expand Up @@ -156,13 +187,14 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // CandidateArtifactLocations: { // CandidateArtifactLocations
* // Explainability: "STRING_VALUE", // required
* // ModelInsights: "STRING_VALUE",
* // BacktestResults: "STRING_VALUE",
* // },
* // CandidateMetrics: [ // MetricDataList
* // { // MetricDatum
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro",
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss",
* // Value: Number("float"),
* // Set: "Train" || "Validation" || "Test",
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "LogLoss" || "InferenceLatency",
* // StandardMetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "LogLoss" || "InferenceLatency" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss",
* // },
* // ],
* // },
Expand All @@ -179,7 +211,7 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // },
* // },
* // AutoMLJobStatus: "Completed" || "InProgress" || "Failed" || "Stopped" || "Stopping", // required
* // AutoMLJobSecondaryStatus: "Starting" || "AnalyzingData" || "FeatureEngineering" || "ModelTuning" || "MaxCandidatesReached" || "Failed" || "Stopped" || "MaxAutoMLJobRuntimeReached" || "Stopping" || "CandidateDefinitionsGenerated" || "GeneratingExplainabilityReport" || "Completed" || "ExplainabilityError" || "DeployingModel" || "ModelDeploymentError" || "GeneratingModelInsightsReport" || "ModelInsightsError" || "TrainingModels", // required
* // AutoMLJobSecondaryStatus: "Starting" || "AnalyzingData" || "FeatureEngineering" || "ModelTuning" || "MaxCandidatesReached" || "Failed" || "Stopped" || "MaxAutoMLJobRuntimeReached" || "Stopping" || "CandidateDefinitionsGenerated" || "GeneratingExplainabilityReport" || "Completed" || "ExplainabilityError" || "DeployingModel" || "ModelDeploymentError" || "GeneratingModelInsightsReport" || "ModelInsightsError" || "TrainingModels" || "PreTraining", // required
* // ModelDeployConfig: { // ModelDeployConfig
* // AutoGenerateEndpointName: true || false,
* // EndpointName: "STRING_VALUE",
Expand Down Expand Up @@ -208,7 +240,7 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // },
* // ResolvedAttributes: { // AutoMLResolvedAttributes
* // AutoMLJobObjective: {
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro", // required
* // MetricName: "Accuracy" || "MSE" || "F1" || "F1macro" || "AUC" || "RMSE" || "MAE" || "R2" || "BalancedAccuracy" || "Precision" || "PrecisionMacro" || "Recall" || "RecallMacro" || "MAPE" || "MASE" || "WAPE" || "AverageWeightedQuantileLoss", // required
* // },
* // CompletionCriteria: {
* // MaxCandidates: Number("int"),
Expand All @@ -221,7 +253,7 @@ export interface DescribeAutoMLJobV2CommandOutput extends DescribeAutoMLJobV2Res
* // },
* // },
* // },
* // AutoMLProblemTypeConfigName: "ImageClassification" || "TextClassification" || "Tabular",
* // AutoMLProblemTypeConfigName: "ImageClassification" || "TextClassification" || "Tabular" || "TimeSeriesForecasting",
* // };
*
* ```
Expand Down

0 comments on commit 1c2f6f0

Please sign in to comment.