Skip to content

Commit

Permalink
feat(client-sagemaker): Adding support for provisioned throughput mod…
Browse files Browse the repository at this point in the history
…e for SageMaker Feature Groups
  • Loading branch information
awstools committed Jan 4, 2024
1 parent d8e0512 commit 985a85e
Show file tree
Hide file tree
Showing 10 changed files with 496 additions and 177 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ export interface CreateFeatureGroupCommandOutput extends CreateFeatureGroupRespo
* },
* TableFormat: "Default" || "Glue" || "Iceberg",
* },
* ThroughputConfig: { // ThroughputConfig
* ThroughputMode: "OnDemand" || "Provisioned", // required
* ProvisionedReadCapacityUnits: Number("int"),
* ProvisionedWriteCapacityUnits: Number("int"),
* },
* RoleArn: "STRING_VALUE",
* Description: "STRING_VALUE",
* Tags: [ // TagList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ export interface DescribeFeatureGroupCommandOutput extends DescribeFeatureGroupR
* // },
* // TableFormat: "Default" || "Glue" || "Iceberg",
* // },
* // ThroughputConfig: { // ThroughputConfigDescription
* // ThroughputMode: "OnDemand" || "Provisioned", // required
* // ProvisionedReadCapacityUnits: Number("int"),
* // ProvisionedWriteCapacityUnits: Number("int"),
* // },
* // RoleArn: "STRING_VALUE",
* // FeatureGroupStatus: "Creating" || "Created" || "CreateFailed" || "Deleting" || "DeleteFailed",
* // OfflineStoreStatus: { // OfflineStoreStatus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Command as $Command } from "@smithy/smithy-client";
import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { DescribeSubscribedWorkteamRequest, DescribeSubscribedWorkteamResponse } from "../models/models_2";
import { DescribeSubscribedWorkteamRequest, DescribeSubscribedWorkteamResponse } from "../models/models_3";
import { de_DescribeSubscribedWorkteamCommand, se_DescribeSubscribedWorkteamCommand } from "../protocols/Aws_json1_1";
import { SageMakerClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SageMakerClient";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export interface UpdateFeatureGroupCommandOutput extends UpdateFeatureGroupRespo
* Value: Number("int"),
* },
* },
* ThroughputConfig: { // ThroughputConfigUpdate
* ThroughputMode: "OnDemand" || "Provisioned",
* ProvisionedReadCapacityUnits: Number("int"),
* ProvisionedWriteCapacityUnits: Number("int"),
* },
* };
* const command = new UpdateFeatureGroupCommand(input);
* const response = await client.send(command);
Expand Down
138 changes: 73 additions & 65 deletions clients/client-sagemaker/src/models/models_1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2785,6 +2785,61 @@ export interface OnlineStoreConfig {
StorageType?: StorageType;
}

/**
* @public
* @enum
*/
export const ThroughputMode = {
ON_DEMAND: "OnDemand",
PROVISIONED: "Provisioned",
} as const;

/**
* @public
*/
export type ThroughputMode = (typeof ThroughputMode)[keyof typeof ThroughputMode];

/**
* @public
* <p>Used to set feature group throughput configuration. There are two modes:
* <code>ON_DEMAND</code> and <code>PROVISIONED</code>. With on-demand mode, you are
* charged for data reads and writes that your application performs on your feature group. You
* do not need to specify read and write throughput because Feature Store accommodates your
* workloads as they ramp up and down. You can switch a feature group to on-demand only once
* in a 24 hour period. With provisioned throughput mode, you specify the read and write
* capacity per second that you expect your application to require, and you are billed based
* on those limits. Exceeding provisioned throughput will result in your requests being
* throttled. </p>
* <p>Note: <code>PROVISIONED</code> throughput mode is supported only for feature groups that
* are offline-only, or use the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType">
* <code>Standard</code>
* </a> tier online store. </p>
*/
export interface ThroughputConfig {
/**
* @public
* <p>The mode used for your feature group throughput: <code>ON_DEMAND</code> or
* <code>PROVISIONED</code>. </p>
*/
ThroughputMode: ThroughputMode | undefined;

/**
* @public
* <p> For provisioned feature groups with online store enabled, this indicates the read
* throughput you are billed for and can consume without throttling. </p>
* <p>This field is not applicable for on-demand feature groups. </p>
*/
ProvisionedReadCapacityUnits?: number;

/**
* @public
* <p> For provisioned feature groups, this indicates the write throughput you are billed for
* and can consume without throttling. </p>
* <p>This field is not applicable for on-demand feature groups. </p>
*/
ProvisionedWriteCapacityUnits?: number;
}

/**
* @public
*/
Expand Down Expand Up @@ -2909,6 +2964,24 @@ export interface CreateFeatureGroupRequest {
*/
OfflineStoreConfig?: OfflineStoreConfig;

/**
* @public
* <p>Used to set feature group throughput configuration. There are two modes:
* <code>ON_DEMAND</code> and <code>PROVISIONED</code>. With on-demand mode, you are
* charged for data reads and writes that your application performs on your feature group. You
* do not need to specify read and write throughput because Feature Store accommodates your
* workloads as they ramp up and down. You can switch a feature group to on-demand only once
* in a 24 hour period. With provisioned throughput mode, you specify the read and write
* capacity per second that you expect your application to require, and you are billed based
* on those limits. Exceeding provisioned throughput will result in your requests being
* throttled. </p>
* <p>Note: <code>PROVISIONED</code> throughput mode is supported only for feature groups that
* are offline-only, or use the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_OnlineStoreConfig.html#sagemaker-Type-OnlineStoreConfig-StorageType">
* <code>Standard</code>
* </a> tier online store. </p>
*/
ThroughputConfig?: ThroughputConfig;

/**
* @public
* <p>The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the
Expand Down Expand Up @@ -11712,71 +11785,6 @@ export interface DebugHookConfig {
CollectionConfigurations?: CollectionConfiguration[];
}

/**
* @public
* <p>Configuration information for SageMaker Debugger rules for debugging. To learn more about
* how to configure the <code>DebugRuleConfiguration</code> parameter,
* see <a href="https://docs.aws.amazon.com/sagemaker/latest/dg/debugger-createtrainingjob-api.html">Use the SageMaker and Debugger Configuration API Operations to Create, Update, and Debug Your Training Job</a>.</p>
*/
export interface DebugRuleConfiguration {
/**
* @public
* <p>The name of the rule configuration. It must be unique relative to other rule
* configuration names.</p>
*/
RuleConfigurationName: string | undefined;

/**
* @public
* <p>Path to local storage location for output of rules. Defaults to
* <code>/opt/ml/processing/output/rule/</code>.</p>
*/
LocalPath?: string;

/**
* @public
* <p>Path to Amazon S3 storage location for rules.</p>
*/
S3OutputPath?: string;

/**
* @public
* <p>The Amazon Elastic Container (ECR) Image for the managed rule evaluation.</p>
*/
RuleEvaluatorImage: string | undefined;

/**
* @public
* <p>The instance type to deploy a custom rule for debugging a training job.</p>
*/
InstanceType?: ProcessingInstanceType;

/**
* @public
* <p>The size, in GB, of the ML storage volume attached to the processing instance.</p>
*/
VolumeSizeInGB?: number;

/**
* @public
* <p>Runtime configuration for rule container.</p>
*/
RuleParameters?: Record<string, string>;
}

/**
* @public
* <p>Configuration information for the infrastructure health check of a training job. A SageMaker-provided health check tests the health of instance hardware and cluster network
* connectivity.</p>
*/
export interface InfraCheckConfig {
/**
* @public
* <p>Enables an infrastructure health check.</p>
*/
EnableInfraCheck?: boolean;
}

/**
* @internal
*/
Expand Down
Loading

0 comments on commit 985a85e

Please sign in to comment.