Skip to content

Commit 10d3280

Browse files
Adding support in Amazon Bedrock to customize models with reinforcement fine-tuning (RFT) and support for updating the existing Custom Model Deployments.
Introduces Serverless training: A fully managed compute infrastructure that abstracts away all infrastructure complexity, allowing you to focus purely on model development. Added AI model customization assets used to train, refine, and evaluate custom models during the model customization process.
1 parent 7b57df2 commit 10d3280

File tree

103 files changed

+5489
-146
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+5489
-146
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.11.702
1+
1.11.703

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockClient.h

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3015,6 +3015,37 @@ class AWS_BEDROCK_API BedrockClient : public Aws::Client::AWSJsonClient, public
30153015
return SubmitAsync(&BedrockClient::UpdateAutomatedReasoningPolicyTestCase, request, handler, context);
30163016
}
30173017

3018+
/**
3019+
* <p> Updates a custom model deployment with a new custom model. This allows you
3020+
* to deploy updated models without creating new deployment endpoints.
3021+
* </p><p><h3>See Also:</h3> <a
3022+
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/UpdateCustomModelDeployment">AWS
3023+
* API Reference</a></p>
3024+
*/
3025+
virtual Model::UpdateCustomModelDeploymentOutcome UpdateCustomModelDeployment(
3026+
const Model::UpdateCustomModelDeploymentRequest& request) const;
3027+
3028+
/**
3029+
* A Callable wrapper for UpdateCustomModelDeployment that returns a future to the operation so that it can be executed in parallel to
3030+
* other requests.
3031+
*/
3032+
template <typename UpdateCustomModelDeploymentRequestT = Model::UpdateCustomModelDeploymentRequest>
3033+
Model::UpdateCustomModelDeploymentOutcomeCallable UpdateCustomModelDeploymentCallable(
3034+
const UpdateCustomModelDeploymentRequestT& request) const {
3035+
return SubmitCallable(&BedrockClient::UpdateCustomModelDeployment, request);
3036+
}
3037+
3038+
/**
3039+
* An Async wrapper for UpdateCustomModelDeployment that queues the request into a thread executor and triggers associated callback when
3040+
* operation has finished.
3041+
*/
3042+
template <typename UpdateCustomModelDeploymentRequestT = Model::UpdateCustomModelDeploymentRequest>
3043+
void UpdateCustomModelDeploymentAsync(const UpdateCustomModelDeploymentRequestT& request,
3044+
const UpdateCustomModelDeploymentResponseReceivedHandler& handler,
3045+
const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const {
3046+
return SubmitAsync(&BedrockClient::UpdateCustomModelDeployment, request, handler, context);
3047+
}
3048+
30183049
/**
30193050
* <p>Updates a guardrail with the values you specify.</p> <ul> <li> <p>Specify a
30203051
* <code>name</code> and optional <code>description</code>.</p> </li> <li>

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/BedrockServiceClientModel.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
#include <aws/bedrock/model/UpdateAutomatedReasoningPolicyAnnotationsResult.h>
133133
#include <aws/bedrock/model/UpdateAutomatedReasoningPolicyResult.h>
134134
#include <aws/bedrock/model/UpdateAutomatedReasoningPolicyTestCaseResult.h>
135+
#include <aws/bedrock/model/UpdateCustomModelDeploymentResult.h>
135136
#include <aws/bedrock/model/UpdateGuardrailResult.h>
136137
#include <aws/bedrock/model/UpdateMarketplaceModelEndpointResult.h>
137138
#include <aws/bedrock/model/UpdateProvisionedModelThroughputResult.h>
@@ -262,6 +263,7 @@ class UntagResourceRequest;
262263
class UpdateAutomatedReasoningPolicyRequest;
263264
class UpdateAutomatedReasoningPolicyAnnotationsRequest;
264265
class UpdateAutomatedReasoningPolicyTestCaseRequest;
266+
class UpdateCustomModelDeploymentRequest;
265267
class UpdateGuardrailRequest;
266268
class UpdateMarketplaceModelEndpointRequest;
267269
class UpdateProvisionedModelThroughputRequest;
@@ -367,6 +369,7 @@ typedef Aws::Utils::Outcome<UntagResourceResult, BedrockError> UntagResourceOutc
367369
typedef Aws::Utils::Outcome<UpdateAutomatedReasoningPolicyResult, BedrockError> UpdateAutomatedReasoningPolicyOutcome;
368370
typedef Aws::Utils::Outcome<UpdateAutomatedReasoningPolicyAnnotationsResult, BedrockError> UpdateAutomatedReasoningPolicyAnnotationsOutcome;
369371
typedef Aws::Utils::Outcome<UpdateAutomatedReasoningPolicyTestCaseResult, BedrockError> UpdateAutomatedReasoningPolicyTestCaseOutcome;
372+
typedef Aws::Utils::Outcome<UpdateCustomModelDeploymentResult, BedrockError> UpdateCustomModelDeploymentOutcome;
370373
typedef Aws::Utils::Outcome<UpdateGuardrailResult, BedrockError> UpdateGuardrailOutcome;
371374
typedef Aws::Utils::Outcome<UpdateMarketplaceModelEndpointResult, BedrockError> UpdateMarketplaceModelEndpointOutcome;
372375
typedef Aws::Utils::Outcome<UpdateProvisionedModelThroughputResult, BedrockError> UpdateProvisionedModelThroughputOutcome;
@@ -468,6 +471,7 @@ typedef std::future<UntagResourceOutcome> UntagResourceOutcomeCallable;
468471
typedef std::future<UpdateAutomatedReasoningPolicyOutcome> UpdateAutomatedReasoningPolicyOutcomeCallable;
469472
typedef std::future<UpdateAutomatedReasoningPolicyAnnotationsOutcome> UpdateAutomatedReasoningPolicyAnnotationsOutcomeCallable;
470473
typedef std::future<UpdateAutomatedReasoningPolicyTestCaseOutcome> UpdateAutomatedReasoningPolicyTestCaseOutcomeCallable;
474+
typedef std::future<UpdateCustomModelDeploymentOutcome> UpdateCustomModelDeploymentOutcomeCallable;
471475
typedef std::future<UpdateGuardrailOutcome> UpdateGuardrailOutcomeCallable;
472476
typedef std::future<UpdateMarketplaceModelEndpointOutcome> UpdateMarketplaceModelEndpointOutcomeCallable;
473477
typedef std::future<UpdateProvisionedModelThroughputOutcome> UpdateProvisionedModelThroughputOutcomeCallable;
@@ -801,6 +805,9 @@ typedef std::function<void(const BedrockClient*, const Model::UpdateAutomatedRea
801805
const Model::UpdateAutomatedReasoningPolicyTestCaseOutcome&,
802806
const std::shared_ptr<const Aws::Client::AsyncCallerContext>&)>
803807
UpdateAutomatedReasoningPolicyTestCaseResponseReceivedHandler;
808+
typedef std::function<void(const BedrockClient*, const Model::UpdateCustomModelDeploymentRequest&,
809+
const Model::UpdateCustomModelDeploymentOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&)>
810+
UpdateCustomModelDeploymentResponseReceivedHandler;
804811
typedef std::function<void(const BedrockClient*, const Model::UpdateGuardrailRequest&, const Model::UpdateGuardrailOutcome&,
805812
const std::shared_ptr<const Aws::Client::AsyncCallerContext>&)>
806813
UpdateGuardrailResponseReceivedHandler;
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock/Bedrock_EXPORTS.h>
8+
#include <aws/bedrock/model/CustomModelDeploymentUpdateStatus.h>
9+
#include <aws/core/utils/memory/stl/AWSString.h>
10+
11+
#include <utility>
12+
13+
namespace Aws {
14+
namespace Utils {
15+
namespace Json {
16+
class JsonValue;
17+
class JsonView;
18+
} // namespace Json
19+
} // namespace Utils
20+
namespace Bedrock {
21+
namespace Model {
22+
23+
/**
24+
* <p> Details about an update to a custom model deployment, including the new
25+
* custom model resource ARN and current update status. </p><p><h3>See Also:</h3>
26+
* <a
27+
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/CustomModelDeploymentUpdateDetails">AWS
28+
* API Reference</a></p>
29+
*/
30+
class CustomModelDeploymentUpdateDetails {
31+
public:
32+
AWS_BEDROCK_API CustomModelDeploymentUpdateDetails() = default;
33+
AWS_BEDROCK_API CustomModelDeploymentUpdateDetails(Aws::Utils::Json::JsonView jsonValue);
34+
AWS_BEDROCK_API CustomModelDeploymentUpdateDetails& operator=(Aws::Utils::Json::JsonView jsonValue);
35+
AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const;
36+
37+
///@{
38+
/**
39+
* <p> ARN of the new custom model being deployed as part of the update. </p>
40+
*/
41+
inline const Aws::String& GetModelArn() const { return m_modelArn; }
42+
inline bool ModelArnHasBeenSet() const { return m_modelArnHasBeenSet; }
43+
template <typename ModelArnT = Aws::String>
44+
void SetModelArn(ModelArnT&& value) {
45+
m_modelArnHasBeenSet = true;
46+
m_modelArn = std::forward<ModelArnT>(value);
47+
}
48+
template <typename ModelArnT = Aws::String>
49+
CustomModelDeploymentUpdateDetails& WithModelArn(ModelArnT&& value) {
50+
SetModelArn(std::forward<ModelArnT>(value));
51+
return *this;
52+
}
53+
///@}
54+
55+
///@{
56+
/**
57+
* <p> Current status of the deployment update. </p>
58+
*/
59+
inline CustomModelDeploymentUpdateStatus GetUpdateStatus() const { return m_updateStatus; }
60+
inline bool UpdateStatusHasBeenSet() const { return m_updateStatusHasBeenSet; }
61+
inline void SetUpdateStatus(CustomModelDeploymentUpdateStatus value) {
62+
m_updateStatusHasBeenSet = true;
63+
m_updateStatus = value;
64+
}
65+
inline CustomModelDeploymentUpdateDetails& WithUpdateStatus(CustomModelDeploymentUpdateStatus value) {
66+
SetUpdateStatus(value);
67+
return *this;
68+
}
69+
///@}
70+
private:
71+
Aws::String m_modelArn;
72+
bool m_modelArnHasBeenSet = false;
73+
74+
CustomModelDeploymentUpdateStatus m_updateStatus{CustomModelDeploymentUpdateStatus::NOT_SET};
75+
bool m_updateStatusHasBeenSet = false;
76+
};
77+
78+
} // namespace Model
79+
} // namespace Bedrock
80+
} // namespace Aws
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock/Bedrock_EXPORTS.h>
8+
#include <aws/core/utils/memory/stl/AWSString.h>
9+
10+
namespace Aws {
11+
namespace Bedrock {
12+
namespace Model {
13+
enum class CustomModelDeploymentUpdateStatus { NOT_SET, Updating, UpdateCompleted, UpdateFailed };
14+
15+
namespace CustomModelDeploymentUpdateStatusMapper {
16+
AWS_BEDROCK_API CustomModelDeploymentUpdateStatus GetCustomModelDeploymentUpdateStatusForName(const Aws::String& name);
17+
18+
AWS_BEDROCK_API Aws::String GetNameForCustomModelDeploymentUpdateStatus(CustomModelDeploymentUpdateStatus value);
19+
} // namespace CustomModelDeploymentUpdateStatusMapper
20+
} // namespace Model
21+
} // namespace Bedrock
22+
} // namespace Aws

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/model/CustomizationConfig.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#pragma once
77
#include <aws/bedrock/Bedrock_EXPORTS.h>
88
#include <aws/bedrock/model/DistillationConfig.h>
9+
#include <aws/bedrock/model/RFTConfig.h>
910

1011
#include <utility>
1112

@@ -48,9 +49,31 @@ class CustomizationConfig {
4849
return *this;
4950
}
5051
///@}
52+
53+
///@{
54+
/**
55+
* <p> Configuration settings for reinforcement fine-tuning (RFT) model
56+
* customization, including grader configuration and hyperparameters. </p>
57+
*/
58+
inline const RFTConfig& GetRftConfig() const { return m_rftConfig; }
59+
inline bool RftConfigHasBeenSet() const { return m_rftConfigHasBeenSet; }
60+
template <typename RftConfigT = RFTConfig>
61+
void SetRftConfig(RftConfigT&& value) {
62+
m_rftConfigHasBeenSet = true;
63+
m_rftConfig = std::forward<RftConfigT>(value);
64+
}
65+
template <typename RftConfigT = RFTConfig>
66+
CustomizationConfig& WithRftConfig(RftConfigT&& value) {
67+
SetRftConfig(std::forward<RftConfigT>(value));
68+
return *this;
69+
}
70+
///@}
5171
private:
5272
DistillationConfig m_distillationConfig;
5373
bool m_distillationConfigHasBeenSet = false;
74+
75+
RFTConfig m_rftConfig;
76+
bool m_rftConfigHasBeenSet = false;
5477
};
5578

5679
} // namespace Model

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/model/CustomizationType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
namespace Aws {
1111
namespace Bedrock {
1212
namespace Model {
13-
enum class CustomizationType { NOT_SET, FINE_TUNING, CONTINUED_PRE_TRAINING, DISTILLATION, IMPORTED };
13+
enum class CustomizationType { NOT_SET, FINE_TUNING, CONTINUED_PRE_TRAINING, DISTILLATION, REINFORCEMENT_FINE_TUNING, IMPORTED };
1414

1515
namespace CustomizationTypeMapper {
1616
AWS_BEDROCK_API CustomizationType GetCustomizationTypeForName(const Aws::String& name);

generated/src/aws-cpp-sdk-bedrock/include/aws/bedrock/model/GetCustomModelDeploymentResult.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#pragma once
77
#include <aws/bedrock/Bedrock_EXPORTS.h>
88
#include <aws/bedrock/model/CustomModelDeploymentStatus.h>
9+
#include <aws/bedrock/model/CustomModelDeploymentUpdateDetails.h>
910
#include <aws/core/utils/DateTime.h>
1011
#include <aws/core/utils/memory/stl/AWSString.h>
1112

@@ -133,6 +134,24 @@ class GetCustomModelDeploymentResult {
133134
}
134135
///@}
135136

137+
///@{
138+
/**
139+
* <p> Details about any pending or completed updates to the custom model
140+
* deployment, including the new model ARN and update status. </p>
141+
*/
142+
inline const CustomModelDeploymentUpdateDetails& GetUpdateDetails() const { return m_updateDetails; }
143+
template <typename UpdateDetailsT = CustomModelDeploymentUpdateDetails>
144+
void SetUpdateDetails(UpdateDetailsT&& value) {
145+
m_updateDetailsHasBeenSet = true;
146+
m_updateDetails = std::forward<UpdateDetailsT>(value);
147+
}
148+
template <typename UpdateDetailsT = CustomModelDeploymentUpdateDetails>
149+
GetCustomModelDeploymentResult& WithUpdateDetails(UpdateDetailsT&& value) {
150+
SetUpdateDetails(std::forward<UpdateDetailsT>(value));
151+
return *this;
152+
}
153+
///@}
154+
136155
///@{
137156
/**
138157
* <p>If the deployment status is <code>FAILED</code>, this field contains a
@@ -201,6 +220,9 @@ class GetCustomModelDeploymentResult {
201220
Aws::String m_description;
202221
bool m_descriptionHasBeenSet = false;
203222

223+
CustomModelDeploymentUpdateDetails m_updateDetails;
224+
bool m_updateDetailsHasBeenSet = false;
225+
204226
Aws::String m_failureMessage;
205227
bool m_failureMessageHasBeenSet = false;
206228

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/**
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
* SPDX-License-Identifier: Apache-2.0.
4+
*/
5+
6+
#pragma once
7+
#include <aws/bedrock/Bedrock_EXPORTS.h>
8+
#include <aws/bedrock/model/LambdaGraderConfig.h>
9+
10+
#include <utility>
11+
12+
namespace Aws {
13+
namespace Utils {
14+
namespace Json {
15+
class JsonValue;
16+
class JsonView;
17+
} // namespace Json
18+
} // namespace Utils
19+
namespace Bedrock {
20+
namespace Model {
21+
22+
/**
23+
* <p> Configuration for the grader used in reinforcement fine-tuning to evaluate
24+
* model responses and provide reward signals. </p><p><h3>See Also:</h3> <a
25+
* href="http://docs.aws.amazon.com/goto/WebAPI/bedrock-2023-04-20/GraderConfig">AWS
26+
* API Reference</a></p>
27+
*/
28+
class GraderConfig {
29+
public:
30+
AWS_BEDROCK_API GraderConfig() = default;
31+
AWS_BEDROCK_API GraderConfig(Aws::Utils::Json::JsonView jsonValue);
32+
AWS_BEDROCK_API GraderConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
33+
AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const;
34+
35+
///@{
36+
/**
37+
* <p> Configuration for using an AWS Lambda function as the grader for evaluating
38+
* model responses and provide reward signals in reinforcement fine-tuning. </p>
39+
*/
40+
inline const LambdaGraderConfig& GetLambdaGrader() const { return m_lambdaGrader; }
41+
inline bool LambdaGraderHasBeenSet() const { return m_lambdaGraderHasBeenSet; }
42+
template <typename LambdaGraderT = LambdaGraderConfig>
43+
void SetLambdaGrader(LambdaGraderT&& value) {
44+
m_lambdaGraderHasBeenSet = true;
45+
m_lambdaGrader = std::forward<LambdaGraderT>(value);
46+
}
47+
template <typename LambdaGraderT = LambdaGraderConfig>
48+
GraderConfig& WithLambdaGrader(LambdaGraderT&& value) {
49+
SetLambdaGrader(std::forward<LambdaGraderT>(value));
50+
return *this;
51+
}
52+
///@}
53+
private:
54+
LambdaGraderConfig m_lambdaGrader;
55+
bool m_lambdaGraderHasBeenSet = false;
56+
};
57+
58+
} // namespace Model
59+
} // namespace Bedrock
60+
} // namespace Aws

0 commit comments

Comments
 (0)