Skip to content

Commit 0dd0bdd

Browse files
author
awstools
committed
feat(client-sagemaker): Heterogeneous clusters: the ability to launch training jobs with multiple instance types. This enables running component of the training job on the instance type that is most suitable for it. e.g. doing data processing and augmentation on CPU instances and neural network training on GPU instances
1 parent 5d50be7 commit 0dd0bdd

File tree

7 files changed

+280
-88
lines changed

7 files changed

+280
-88
lines changed

clients/client-sagemaker/src/commands/CreateImageCommand.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import {
1212
SerdeContext as __SerdeContext,
1313
} from "@aws-sdk/types";
1414

15-
import { CreateImageRequest } from "../models/models_0";
16-
import { CreateImageResponse } from "../models/models_1";
15+
import { CreateImageRequest, CreateImageResponse } from "../models/models_1";
1716
import {
1817
deserializeAws_json1_1CreateImageCommand,
1918
serializeAws_json1_1CreateImageCommand,

clients/client-sagemaker/src/models/models_0.ts

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,12 @@ export interface S3DataSource {
10291029
* manifest file.</p>
10301030
*/
10311031
AttributeNames?: string[];
1032+
1033+
/**
1034+
* <p>A list of names of instance groups that get data
1035+
* from the S3 data source.</p>
1036+
*/
1037+
InstanceGroupNames?: string[];
10321038
}
10331039

10341040
export namespace S3DataSource {
@@ -1301,6 +1307,37 @@ export enum TrainingInstanceType {
13011307
ML_P4D_24XLARGE = "ml.p4d.24xlarge",
13021308
}
13031309

1310+
/**
1311+
* <p>Defines an instance group for heterogeneous cluster training.
1312+
* When requesting a training job using the <a href="https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateTrainingJob.html">CreateTrainingJob</a> API,
1313+
* you can configure up to 5 different ML training instance groups.</p>
1314+
*/
1315+
export interface InstanceGroup {
1316+
/**
1317+
* <p>Specifies the instance type of the instance group.</p>
1318+
*/
1319+
InstanceType: TrainingInstanceType | string | undefined;
1320+
1321+
/**
1322+
* <p>Specifies the number of instances of the instance group.</p>
1323+
*/
1324+
InstanceCount: number | undefined;
1325+
1326+
/**
1327+
* <p>Specifies the name of the instance group.</p>
1328+
*/
1329+
InstanceGroupName: string | undefined;
1330+
}
1331+
1332+
export namespace InstanceGroup {
1333+
/**
1334+
* @internal
1335+
*/
1336+
export const filterSensitiveLog = (obj: InstanceGroup): any => ({
1337+
...obj,
1338+
});
1339+
}
1340+
13041341
/**
13051342
* <p>Describes the resources, including ML compute instances and ML storage volumes, to
13061343
* use for model training. </p>
@@ -1309,13 +1346,13 @@ export interface ResourceConfig {
13091346
/**
13101347
* <p>The ML compute instance type. </p>
13111348
*/
1312-
InstanceType: TrainingInstanceType | string | undefined;
1349+
InstanceType?: TrainingInstanceType | string;
13131350

13141351
/**
13151352
* <p>The number of ML compute instances to use. For distributed training, provide a
13161353
* value greater than 1. </p>
13171354
*/
1318-
InstanceCount: number | undefined;
1355+
InstanceCount?: number;
13191356

13201357
/**
13211358
* <p>The size of the ML storage volume that you want to provision. </p>
@@ -1369,6 +1406,11 @@ export interface ResourceConfig {
13691406
* </ul>
13701407
*/
13711408
VolumeKmsKeyId?: string;
1409+
1410+
/**
1411+
* <p>The configuration of a heterogeneous cluster in JSON format.</p>
1412+
*/
1413+
InstanceGroups?: InstanceGroup[];
13721414
}
13731415

13741416
export namespace ResourceConfig {
@@ -12000,39 +12042,3 @@ export namespace CreateHyperParameterTuningJobResponse {
1200012042
...obj,
1200112043
});
1200212044
}
12003-
12004-
export interface CreateImageRequest {
12005-
/**
12006-
* <p>The description of the image.</p>
12007-
*/
12008-
Description?: string;
12009-
12010-
/**
12011-
* <p>The display name of the image. If not provided, <code>ImageName</code> is displayed.</p>
12012-
*/
12013-
DisplayName?: string;
12014-
12015-
/**
12016-
* <p>The name of the image. Must be unique to your account.</p>
12017-
*/
12018-
ImageName: string | undefined;
12019-
12020-
/**
12021-
* <p>The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.</p>
12022-
*/
12023-
RoleArn: string | undefined;
12024-
12025-
/**
12026-
* <p>A list of tags to apply to the image.</p>
12027-
*/
12028-
Tags?: Tag[];
12029-
}
12030-
12031-
export namespace CreateImageRequest {
12032-
/**
12033-
* @internal
12034-
*/
12035-
export const filterSensitiveLog = (obj: CreateImageRequest): any => ({
12036-
...obj,
12037-
});
12038-
}

clients/client-sagemaker/src/models/models_1.ts

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,42 @@ import {
106106
VpcConfig,
107107
} from "./models_0";
108108

109+
export interface CreateImageRequest {
110+
/**
111+
* <p>The description of the image.</p>
112+
*/
113+
Description?: string;
114+
115+
/**
116+
* <p>The display name of the image. If not provided, <code>ImageName</code> is displayed.</p>
117+
*/
118+
DisplayName?: string;
119+
120+
/**
121+
* <p>The name of the image. Must be unique to your account.</p>
122+
*/
123+
ImageName: string | undefined;
124+
125+
/**
126+
* <p>The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.</p>
127+
*/
128+
RoleArn: string | undefined;
129+
130+
/**
131+
* <p>A list of tags to apply to the image.</p>
132+
*/
133+
Tags?: Tag[];
134+
}
135+
136+
export namespace CreateImageRequest {
137+
/**
138+
* @internal
139+
*/
140+
export const filterSensitiveLog = (obj: CreateImageRequest): any => ({
141+
...obj,
142+
});
143+
}
144+
109145
export interface CreateImageResponse {
110146
/**
111147
* <p>The Amazon Resource Name (ARN) of the image.</p>
@@ -11306,37 +11342,3 @@ export namespace EndpointOutputConfiguration {
1130611342
...obj,
1130711343
});
1130811344
}
11309-
11310-
/**
11311-
* <p>The metrics of recommendations.</p>
11312-
*/
11313-
export interface RecommendationMetrics {
11314-
/**
11315-
* <p>Defines the cost per hour for the instance. </p>
11316-
*/
11317-
CostPerHour: number | undefined;
11318-
11319-
/**
11320-
* <p>Defines the cost per inference for the instance .</p>
11321-
*/
11322-
CostPerInference: number | undefined;
11323-
11324-
/**
11325-
* <p>The expected maximum number of requests per minute for the instance.</p>
11326-
*/
11327-
MaxInvocations: number | undefined;
11328-
11329-
/**
11330-
* <p>The expected model latency at maximum invocation per minute for the instance.</p>
11331-
*/
11332-
ModelLatency: number | undefined;
11333-
}
11334-
11335-
export namespace RecommendationMetrics {
11336-
/**
11337-
* @internal
11338-
*/
11339-
export const filterSensitiveLog = (obj: RecommendationMetrics): any => ({
11340-
...obj,
11341-
});
11342-
}

clients/client-sagemaker/src/models/models_2.ts

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ import {
128128
RecommendationJobInputConfig,
129129
RecommendationJobStoppingConditions,
130130
RecommendationJobType,
131-
RecommendationMetrics,
132131
RootAccess,
133132
RuleEvaluationStatus,
134133
ServiceCatalogProvisioningDetails,
@@ -143,6 +142,40 @@ import {
143142
TrialComponentStatus,
144143
} from "./models_1";
145144

145+
/**
146+
* <p>The metrics of recommendations.</p>
147+
*/
148+
export interface RecommendationMetrics {
149+
/**
150+
* <p>Defines the cost per hour for the instance. </p>
151+
*/
152+
CostPerHour: number | undefined;
153+
154+
/**
155+
* <p>Defines the cost per inference for the instance .</p>
156+
*/
157+
CostPerInference: number | undefined;
158+
159+
/**
160+
* <p>The expected maximum number of requests per minute for the instance.</p>
161+
*/
162+
MaxInvocations: number | undefined;
163+
164+
/**
165+
* <p>The expected model latency at maximum invocation per minute for the instance.</p>
166+
*/
167+
ModelLatency: number | undefined;
168+
}
169+
170+
export namespace RecommendationMetrics {
171+
/**
172+
* @internal
173+
*/
174+
export const filterSensitiveLog = (obj: RecommendationMetrics): any => ({
175+
...obj,
176+
});
177+
}
178+
146179
/**
147180
* <p>A list of environment parameters suggested by the Amazon SageMaker Inference Recommender.</p>
148181
*/
@@ -10973,8 +11006,3 @@ export namespace ListProcessingJobsResponse {
1097311006
...obj,
1097411007
});
1097511008
}
10976-
10977-
export enum ProjectSortBy {
10978-
CREATION_TIME = "CreationTime",
10979-
NAME = "Name",
10980-
}

clients/client-sagemaker/src/models/models_3.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ import {
9393
PipelineExperimentConfig,
9494
PipelineStatus,
9595
ProcessingJobStatus,
96-
ProjectSortBy,
9796
ProjectStatus,
9897
ResourceType,
9998
SecondaryStatus,
@@ -111,6 +110,11 @@ import {
111110
Workteam,
112111
} from "./models_2";
113112

113+
export enum ProjectSortBy {
114+
CREATION_TIME = "CreationTime",
115+
NAME = "Name",
116+
}
117+
114118
export enum ProjectSortOrder {
115119
ASCENDING = "Ascending",
116120
DESCENDING = "Descending",

0 commit comments

Comments
 (0)