File tree Expand file tree Collapse file tree 3 files changed +3
-16
lines changed
src/sagemaker/jumpstart/hub
integ/sagemaker/jumpstart
unit/sagemaker/jumpstart/hub Expand file tree Collapse file tree 3 files changed +3
-16
lines changed Original file line number Diff line number Diff line change 1919
2020
2121def camel_to_snake (camel_case_string : str ) -> str :
22- """Converts PascalCase to snake_case_string using a regex.
22+ """Converts camelCase to snake_case_string using a regex.
2323
24- This regex cannot handle whitespace ("PascalString TwoWords")
24+ This regex cannot handle whitespace ("camelString TwoWords")
2525 """
2626 return re .sub (r"(?<!^)(?=[A-Z])" , "_" , camel_case_string ).lower ()
2727
Original file line number Diff line number Diff line change @@ -53,20 +53,6 @@ def get_sm_session() -> Session:
5353 return Session (boto_session = boto3 .Session (region_name = JUMPSTART_DEFAULT_REGION_NAME ))
5454
5555
56- def get_sm_session_with_override () -> Session :
57- # [TODO]: Remove service endpoint override before GA
58- # boto3.set_stream_logger(name='botocore', level=logging.DEBUG)
59- boto_session = boto3 .Session (region_name = "us-west-2" )
60- sagemaker = boto3 .client (
61- service_name = "sagemaker" ,
62- endpoint_url = "https://sagemaker.gamma.us-west-2.ml-platform.aws.a2z.com" ,
63- )
64- return Session (
65- boto_session = boto_session ,
66- sagemaker_client = sagemaker ,
67- )
68-
69-
7056def get_training_dataset_for_model_and_version (model_id : str , version : str ) -> dict :
7157 return TRAINING_DATASET_MODEL_DICT [(model_id , version )]
7258
Original file line number Diff line number Diff line change 2828@pytest .mark .parametrize (
2929 "input_string, expected" ,
3030 [
31+ ("camelCase" , "camel_case" ),
3132 ("PascalCase" , "pascal_case" ),
3233 ("already_snake" , "already_snake" ),
3334 ("" , "" ),
You can’t perform that action at this time.
0 commit comments