Skip to content

Commit 395b5d5

Browse files
Mia Changpymia
authored andcommitted
refactor(sagemaker): address PR review feedback for serverless inference
- Remove standalone readme_serverless_section.md file - Remove enhanced_integ_test.ts file - Consolidate serverless tests into existing integ.endpoint-config.ts - Add comprehensive serverless test cases (minimal, full, boundary values) - Maintain existing documentation in main SageMaker README - Keep mutual exclusivity validation with AWS docs justification Addresses review comments in PR #35557
1 parent e426f60 commit 395b5d5

File tree

3 files changed

+23
-167
lines changed

3 files changed

+23
-167
lines changed

enhanced_integ_test.ts

Lines changed: 0 additions & 131 deletions
This file was deleted.

packages/@aws-cdk/aws-sagemaker-alpha/test/integ.endpoint-config.ts

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,38 @@ endpointConfig.addInstanceProductionVariant({
9191
initialVariantWeight: 2.0,
9292
});
9393

94-
// Test serverless endpoint configuration
95-
const serverlessEndpointConfig = new sagemaker.EndpointConfig(stack, 'ServerlessEndpointConfig', {
94+
// Test serverless endpoint configuration with all properties
95+
new sagemaker.EndpointConfig(stack, 'ServerlessEndpointConfig', {
9696
serverlessProductionVariant: {
9797
model: modelWithoutArtifactAndVpc,
9898
variantName: 'serverlessVariant',
9999
maxConcurrency: 10,
100100
memorySizeInMB: 2048,
101101
provisionedConcurrency: 5,
102+
initialVariantWeight: 1.0,
102103
},
103104
});
104105

105-
// Ensure serverless endpoint config is used
106-
serverlessEndpointConfig.node.addValidation({
107-
validate: () => [],
106+
// Test serverless endpoint configuration with minimal properties
107+
new sagemaker.EndpointConfig(stack, 'MinimalServerlessEndpointConfig', {
108+
serverlessProductionVariant: {
109+
model: modelWithoutArtifactAndVpc,
110+
variantName: 'minimalServerlessVariant',
111+
maxConcurrency: 1,
112+
memorySizeInMB: 1024,
113+
// No provisionedConcurrency - testing optional property
114+
},
115+
});
116+
117+
// Test serverless endpoint configuration with boundary values
118+
new sagemaker.EndpointConfig(stack, 'BoundaryServerlessEndpointConfig', {
119+
serverlessProductionVariant: {
120+
model: modelWithoutArtifactAndVpc,
121+
variantName: 'boundaryServerlessVariant',
122+
maxConcurrency: 200, // Maximum allowed
123+
memorySizeInMB: 6144, // Maximum allowed
124+
provisionedConcurrency: 200, // Maximum allowed (equal to maxConcurrency)
125+
},
108126
});
109127

110128
new IntegTest(app, 'integtest-endpointconfig', {

readme_serverless_section.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)