Skip to content

Commit 1325ef0

Browse files
author
awstools
committed
feat(client-bedrock): You can now specify a cross region inference profile as a teacher model for the CreateModelCustomizationJob API. Additionally, the GetModelCustomizationJob API has been enhanced to return the sub-task statuses of a customization job within the StatusDetails response field.
1 parent 69fe645 commit 1325ef0

File tree

5 files changed

+393
-6
lines changed

5 files changed

+393
-6
lines changed

clients/client-bedrock/src/commands/GetModelCustomizationJobCommand.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,23 @@ export interface GetModelCustomizationJobCommandOutput extends GetModelCustomiza
5454
* // roleArn: "STRING_VALUE", // required
5555
* // status: "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped",
5656
* // failureMessage: "STRING_VALUE",
57+
* // statusDetails: { // StatusDetails
58+
* // validationDetails: { // ValidationDetails
59+
* // status: "InProgress" || "Completed" || "Stopping" || "Stopped" || "Failed" || "NotStarted",
60+
* // creationTime: new Date("TIMESTAMP"),
61+
* // lastModifiedTime: new Date("TIMESTAMP"),
62+
* // },
63+
* // dataProcessingDetails: { // DataProcessingDetails
64+
* // status: "InProgress" || "Completed" || "Stopping" || "Stopped" || "Failed" || "NotStarted",
65+
* // creationTime: new Date("TIMESTAMP"),
66+
* // lastModifiedTime: new Date("TIMESTAMP"),
67+
* // },
68+
* // trainingDetails: { // TrainingDetails
69+
* // status: "InProgress" || "Completed" || "Stopping" || "Stopped" || "Failed" || "NotStarted",
70+
* // creationTime: new Date("TIMESTAMP"),
71+
* // lastModifiedTime: new Date("TIMESTAMP"),
72+
* // },
73+
* // },
5774
* // creationTime: new Date("TIMESTAMP"), // required
5875
* // lastModifiedTime: new Date("TIMESTAMP"),
5976
* // endTime: new Date("TIMESTAMP"),

clients/client-bedrock/src/commands/ListModelCustomizationJobsCommand.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,23 @@ export interface ListModelCustomizationJobsCommandOutput extends ListModelCustom
5858
* // jobName: "STRING_VALUE", // required
5959
* // status: "InProgress" || "Completed" || "Failed" || "Stopping" || "Stopped", // required
6060
* // lastModifiedTime: new Date("TIMESTAMP"),
61+
* // statusDetails: { // StatusDetails
62+
* // validationDetails: { // ValidationDetails
63+
* // status: "InProgress" || "Completed" || "Stopping" || "Stopped" || "Failed" || "NotStarted",
64+
* // creationTime: new Date("TIMESTAMP"),
65+
* // lastModifiedTime: new Date("TIMESTAMP"),
66+
* // },
67+
* // dataProcessingDetails: { // DataProcessingDetails
68+
* // status: "InProgress" || "Completed" || "Stopping" || "Stopped" || "Failed" || "NotStarted",
69+
* // creationTime: new Date("TIMESTAMP"),
70+
* // lastModifiedTime: new Date("TIMESTAMP"),
71+
* // },
72+
* // trainingDetails: { // TrainingDetails
73+
* // status: "InProgress" || "Completed" || "Stopping" || "Stopped" || "Failed" || "NotStarted",
74+
* // creationTime: new Date("TIMESTAMP"),
75+
* // lastModifiedTime: new Date("TIMESTAMP"),
76+
* // },
77+
* // },
6178
* // creationTime: new Date("TIMESTAMP"), // required
6279
* // endTime: new Date("TIMESTAMP"),
6380
* // customModelArn: "STRING_VALUE",

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

Lines changed: 149 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6476,7 +6476,7 @@ export type CustomizationConfig = CustomizationConfig.DistillationConfigMember |
64766476
*/
64776477
export namespace CustomizationConfig {
64786478
/**
6479-
* <p>The distillation configuration for the custom model.</p>
6479+
* <p>The Distillation configuration for the custom model.</p>
64806480
* @public
64816481
*/
64826482
export interface DistillationConfigMember {
@@ -6588,8 +6588,8 @@ export interface RequestMetadataBaseFilters {
65886588

65896589
/**
65906590
* <p>Rules for filtering invocation logs. A filter can be a mapping of a metadata
6591-
* key to a value that it should or should not equal (a base filter), or a list of base filters
6592-
* that are all applied with <code>AND</code> or <code>OR</code> logical operators</p>
6591+
* key to a value that it should or should not equal (a base filter), or a list of base filters
6592+
* that are all applied with <code>AND</code> or <code>OR</code> logical operators</p>
65936593
* @public
65946594
*/
65956595
export type RequestMetadataFilters =
@@ -8183,6 +8183,140 @@ export const ModelCustomizationJobStatus = {
81838183
export type ModelCustomizationJobStatus =
81848184
(typeof ModelCustomizationJobStatus)[keyof typeof ModelCustomizationJobStatus];
81858185

8186+
/**
8187+
* @public
8188+
* @enum
8189+
*/
8190+
export const JobStatusDetails = {
8191+
COMPLETED: "Completed",
8192+
FAILED: "Failed",
8193+
IN_PROGRESS: "InProgress",
8194+
NOT_STARTED: "NotStarted",
8195+
STOPPED: "Stopped",
8196+
STOPPING: "Stopping",
8197+
} as const;
8198+
8199+
/**
8200+
* @public
8201+
*/
8202+
export type JobStatusDetails = (typeof JobStatusDetails)[keyof typeof JobStatusDetails];
8203+
8204+
/**
8205+
* <p>For a Distillation job, the status details for the data processing sub-task of the job.</p>
8206+
* @public
8207+
*/
8208+
export interface DataProcessingDetails {
8209+
/**
8210+
* <p>The status of the data processing sub-task of the job.</p>
8211+
* @public
8212+
*/
8213+
status?: JobStatusDetails | undefined;
8214+
8215+
/**
8216+
* <p>The start time of the data processing sub-task of the job.</p>
8217+
* @public
8218+
*/
8219+
creationTime?: Date | undefined;
8220+
8221+
/**
8222+
* <p>The latest update to the data processing sub-task of the job.</p>
8223+
* @public
8224+
*/
8225+
lastModifiedTime?: Date | undefined;
8226+
}
8227+
8228+
/**
8229+
* <p>For a Distillation job, the status details for the training sub-task of the job.</p>
8230+
* @public
8231+
*/
8232+
export interface TrainingDetails {
8233+
/**
8234+
* <p>The status of the training sub-task of the job.</p>
8235+
* @public
8236+
*/
8237+
status?: JobStatusDetails | undefined;
8238+
8239+
/**
8240+
* <p>The start time of the training sub-task of the job.</p>
8241+
* @public
8242+
*/
8243+
creationTime?: Date | undefined;
8244+
8245+
/**
8246+
* <p>The latest update to the training sub-task of the job.</p>
8247+
* @public
8248+
*/
8249+
lastModifiedTime?: Date | undefined;
8250+
}
8251+
8252+
/**
8253+
* <p>For a Distillation job, the status details for the validation sub-task of the job.</p>
8254+
* @public
8255+
*/
8256+
export interface ValidationDetails {
8257+
/**
8258+
* <p>The status of the validation sub-task of the job.</p>
8259+
* @public
8260+
*/
8261+
status?: JobStatusDetails | undefined;
8262+
8263+
/**
8264+
* <p>The start time of the validation sub-task of the job.</p>
8265+
* @public
8266+
*/
8267+
creationTime?: Date | undefined;
8268+
8269+
/**
8270+
* <p>The latest update to the validation sub-task of the job.</p>
8271+
* @public
8272+
*/
8273+
lastModifiedTime?: Date | undefined;
8274+
}
8275+
8276+
/**
8277+
* <p>For a Distillation job, the status details for sub-tasks of the job. Possible statuses for each sub-task include the following:</p>
8278+
* <ul>
8279+
* <li>
8280+
* <p>NotStarted</p>
8281+
* </li>
8282+
* <li>
8283+
* <p>InProgress</p>
8284+
* </li>
8285+
* <li>
8286+
* <p>Completed</p>
8287+
* </li>
8288+
* <li>
8289+
* <p>Stopping</p>
8290+
* </li>
8291+
* <li>
8292+
* <p>Stopped</p>
8293+
* </li>
8294+
* <li>
8295+
* <p>Failed</p>
8296+
* </li>
8297+
* </ul>
8298+
* @public
8299+
*/
8300+
export interface StatusDetails {
8301+
/**
8302+
* <p>The status details for the validation sub-task of the job.</p>
8303+
* @public
8304+
*/
8305+
validationDetails?: ValidationDetails | undefined;
8306+
8307+
/**
8308+
* <p>The status details for the data processing sub-task of the job.</p>
8309+
* @public
8310+
*/
8311+
dataProcessingDetails?: DataProcessingDetails | undefined;
8312+
8313+
/**
8314+
* <p>The status details for the training sub-task of the job.</p>
8315+
* @public
8316+
*/
8317+
trainingDetails?: TrainingDetails | undefined;
8318+
}
8319+
81868320
/**
81878321
* @public
81888322
*/
@@ -8236,6 +8370,12 @@ export interface GetModelCustomizationJobResponse {
82368370
*/
82378371
failureMessage?: string | undefined;
82388372

8373+
/**
8374+
* <p>For a Distillation job, the details about the statuses of the sub-tasks of the customization job. </p>
8375+
* @public
8376+
*/
8377+
statusDetails?: StatusDetails | undefined;
8378+
82398379
/**
82408380
* <p>Time that the resource was created.</p>
82418381
* @public
@@ -8426,6 +8566,12 @@ export interface ModelCustomizationJobSummary {
84268566
*/
84278567
lastModifiedTime?: Date | undefined;
84288568

8569+
/**
8570+
* <p>Details about the status of the data processing sub-task of the job.</p>
8571+
* @public
8572+
*/
8573+
statusDetails?: StatusDetails | undefined;
8574+
84298575
/**
84308576
* <p>Creation time of the custom model. </p>
84318577
* @public

clients/client-bedrock/src/protocols/Aws_restJson1.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ import {
214214
CustomMetricDefinition,
215215
CustomMetricEvaluatorModelConfig,
216216
CustomModelSummary,
217+
DataProcessingDetails,
217218
DistillationConfig,
218219
EndpointConfig,
219220
EvaluationBedrockModel,
@@ -302,14 +303,17 @@ import {
302303
SageMakerEndpoint,
303304
ServiceQuotaExceededException,
304305
ServiceUnavailableException,
306+
StatusDetails,
305307
Tag,
306308
TeacherModelConfig,
307309
TextInferenceConfig,
308310
ThrottlingException,
309311
TooManyTagsException,
310312
TrainingDataConfig,
313+
TrainingDetails,
311314
TrainingMetrics,
312315
ValidationDataConfig,
316+
ValidationDetails,
313317
ValidationException,
314318
Validator,
315319
ValidatorMetric,
@@ -2257,6 +2261,7 @@ export const de_GetModelCustomizationJobCommand = async (
22572261
outputModelName: __expectString,
22582262
roleArn: __expectString,
22592263
status: __expectString,
2264+
statusDetails: (_) => de_StatusDetails(_, context),
22602265
trainingDataConfig: _json,
22612266
trainingMetrics: (_) => de_TrainingMetrics(_, context),
22622267
validationDataConfig: _json,
@@ -3874,6 +3879,17 @@ const de_CustomModelSummaryList = (output: any, context: __SerdeContext): Custom
38743879

38753880
// de_CustomModelUnits omitted.
38763881

3882+
/**
3883+
* deserializeAws_restJson1DataProcessingDetails
3884+
*/
3885+
const de_DataProcessingDetails = (output: any, context: __SerdeContext): DataProcessingDetails => {
3886+
return take(output, {
3887+
creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3888+
lastModifiedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
3889+
status: __expectString,
3890+
}) as any;
3891+
};
3892+
38773893
// de_DistillationConfig omitted.
38783894

38793895
// de_EndpointConfig omitted.
@@ -4441,6 +4457,7 @@ const de_ModelCustomizationJobSummary = (output: any, context: __SerdeContext):
44414457
jobName: __expectString,
44424458
lastModifiedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
44434459
status: __expectString,
4460+
statusDetails: (_: any) => de_StatusDetails(_, context),
44444461
}) as any;
44454462
};
44464463

@@ -4798,6 +4815,17 @@ const de_RoutingCriteria = (output: any, context: __SerdeContext): RoutingCriter
47984815

47994816
// de_SecurityGroupIds omitted.
48004817

4818+
/**
4819+
* deserializeAws_restJson1StatusDetails
4820+
*/
4821+
const de_StatusDetails = (output: any, context: __SerdeContext): StatusDetails => {
4822+
return take(output, {
4823+
dataProcessingDetails: (_: any) => de_DataProcessingDetails(_, context),
4824+
trainingDetails: (_: any) => de_TrainingDetails(_, context),
4825+
validationDetails: (_: any) => de_ValidationDetails(_, context),
4826+
}) as any;
4827+
};
4828+
48014829
// de_SubnetIds omitted.
48024830

48034831
// de_Tag omitted.
@@ -4820,6 +4848,17 @@ const de_TextInferenceConfig = (output: any, context: __SerdeContext): TextInfer
48204848

48214849
// de_TrainingDataConfig omitted.
48224850

4851+
/**
4852+
* deserializeAws_restJson1TrainingDetails
4853+
*/
4854+
const de_TrainingDetails = (output: any, context: __SerdeContext): TrainingDetails => {
4855+
return take(output, {
4856+
creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4857+
lastModifiedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4858+
status: __expectString,
4859+
}) as any;
4860+
};
4861+
48234862
/**
48244863
* deserializeAws_restJson1TrainingMetrics
48254864
*/
@@ -4831,6 +4870,17 @@ const de_TrainingMetrics = (output: any, context: __SerdeContext): TrainingMetri
48314870

48324871
// de_ValidationDataConfig omitted.
48334872

4873+
/**
4874+
* deserializeAws_restJson1ValidationDetails
4875+
*/
4876+
const de_ValidationDetails = (output: any, context: __SerdeContext): ValidationDetails => {
4877+
return take(output, {
4878+
creationTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4879+
lastModifiedTime: (_: any) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
4880+
status: __expectString,
4881+
}) as any;
4882+
};
4883+
48344884
/**
48354885
* deserializeAws_restJson1ValidationMetrics
48364886
*/

0 commit comments

Comments
 (0)