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 19
19
20
20
21
21
def 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.
23
23
24
- This regex cannot handle whitespace ("PascalString TwoWords")
24
+ This regex cannot handle whitespace ("camelString TwoWords")
25
25
"""
26
26
return re .sub (r"(?<!^)(?=[A-Z])" , "_" , camel_case_string ).lower ()
27
27
Original file line number Diff line number Diff line change @@ -53,20 +53,6 @@ def get_sm_session() -> Session:
53
53
return Session (boto_session = boto3 .Session (region_name = JUMPSTART_DEFAULT_REGION_NAME ))
54
54
55
55
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
-
70
56
def get_training_dataset_for_model_and_version (model_id : str , version : str ) -> dict :
71
57
return TRAINING_DATASET_MODEL_DICT [(model_id , version )]
72
58
Original file line number Diff line number Diff line change 28
28
@pytest .mark .parametrize (
29
29
"input_string, expected" ,
30
30
[
31
+ ("camelCase" , "camel_case" ),
31
32
("PascalCase" , "pascal_case" ),
32
33
("already_snake" , "already_snake" ),
33
34
("" , "" ),
You can’t perform that action at this time.
0 commit comments