Skip to content

Fix serverless endpoint configuration field name conversion #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions src/sagemaker_core/main/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@ def convert_to_snake_case(entity_name):
return re.sub("([a-z0-9])([A-Z])", r"\1_\2", snake_case).lower()


def snake_to_pascal(snake_str):
"""
Convert a snake_case string to PascalCase.
Args:
snake_str (str): The snake_case string to be converted.
Returns:
str: The PascalCase string.
"""
components = snake_str.split("_")
return "".join(x.title() for x in components[0:])


def reformat_file_with_black(filename):
Expand Down Expand Up @@ -198,6 +188,8 @@ def get_textual_rich_logger(name: str, log_level: str = "INFO") -> logging.Logge
SPECIAL_SNAKE_TO_PASCAL_MAPPINGS = {
"volume_size_in_g_b": "VolumeSizeInGB",
"volume_size_in_gb": "VolumeSizeInGB",
"memory_size_in_mb": "MemorySizeInMB",
"supported_response_mime_types": "SupportedResponseMIMETypes",
}


Expand Down