aws / aws/sagemaker-core

Parameter validation failed - "MemorySizeInMb", must be one of: MemorySizeInMB, MaxConcurrency, ProvisionedConcurrency

Open
#225 4 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
24
Forks
25
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
getting an error when trying to create model endpoint config.

**To reproduce**

```
from sagemaker_core.resources import EndpointConfig, Endpoint
from sagemaker_core.main.shapes import ProductionVariant, ProductionVariantServerlessConfig

endpoint_config = EndpointConfig.create(
endpoint_config_name='endpoint-config',
production_variants=[
ProductionVariant(
variant_name='variantA',
model_name='MyModel',
serverless_config=ProductionVariantServerlessConfig(
memory_size_in_mb=1024,
max_concurrency=2
)
)
]
)
```

Getting error:
```
ParamValidationError: Parameter validation failed:
Missing required parameter in ProductionVariants[0].ServerlessConfig: "MemorySizeInMB"
Unknown parameter in ProductionVariants[0].ServerlessConfig: "MemorySizeInMb", must be one of: MemorySizeInMB,
MaxConcurrency, ProvisionedConcurrency
```

**Expected behavior**
No error raised.

**Screenshots or logs**
If applicable, add screenshots or logs to help explain your problem.

**Bug information**
A description of your system. Please provide:
- **SageMaker Core version**: 1.0.16
- **Python version**: 3.11

**Additional context**
I'm guessing that there's some case sensitive issue happening here...?

Contributor guide

Open the contributing guide

Research direction

Start with ProductionVariantServerlessConfig and the EndpointConfig.create path shown in the reproduction. Trace how memory_size_in_mb is converted for ServerlessConfig, then rerun the example against SageMaker validation and confirm the endpoint configuration is created without the MemorySizeInMb/MemorySizeInMB error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.