Skip to content

Commit 9409031

Browse files
author
Jonathan Makunga
committed
Refactoring
1 parent 1e14343 commit 9409031

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/sagemaker/jumpstart/utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,8 +1220,6 @@ def get_metrics_from_deployment_configs(
12201220
if not deployment_configs:
12211221
return {}
12221222

1223-
print("deployment_configs: {}".format(deployment_configs))
1224-
12251223
data = {"Instance Type": [], "Config Name": [], "Concurrent Users": []}
12261224
instance_rate_data = {}
12271225
for index, deployment_config in enumerate(deployment_configs):

src/sagemaker/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1791,9 +1791,9 @@ def extract_instance_rate_per_hour(price_data: Dict[str, Any]) -> Optional[Dict[
17911791
if value is not None:
17921792
value = str(round(float(value), 3))
17931793
return {
1794-
"unit": f"{currency}/{price.get('unit', 'Hrs')}",
1794+
"unit": f"{currency}/Hr",
17951795
"value": value,
1796-
"name": "Instance Rate",
1796+
"name": "On-demand Instance Rate",
17971797
}
17981798
return None
17991799

tests/unit/test_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ def test_deep_override_skip_keys(self):
19291929
}
19301930
]
19311931
},
1932-
{"name": "Instance Rate", "unit": "USD/Hrs", "value": "0.9"},
1932+
{"name": "On-demand Instance Rate", "unit": "USD/Hr", "value": "0.9"},
19331933
),
19341934
(
19351935
"ml.t4g.nano",
@@ -1947,7 +1947,7 @@ def test_deep_override_skip_keys(self):
19471947
'"termAttributes": {}}}}}'
19481948
]
19491949
},
1950-
{"name": "Instance Rate", "unit": "USD/Hrs", "value": "0.008"},
1950+
{"name": "On-demand Instance Rate", "unit": "USD/Hr", "value": "0.008"},
19511951
),
19521952
(
19531953
"ml.t4g.nano",
@@ -1965,7 +1965,7 @@ def test_deep_override_skip_keys(self):
19651965
'"termAttributes": {}}}}}'
19661966
]
19671967
},
1968-
{"name": "Instance Rate", "unit": "USD/Hrs", "value": "0.008"},
1968+
{"name": "On-demand Instance Rate", "unit": "USD/Hr", "value": "0.008"},
19691969
),
19701970
(
19711971
"ml.t4g.nano",
@@ -1983,7 +1983,7 @@ def test_deep_override_skip_keys(self):
19831983
'"termAttributes": {}}}}}'
19841984
]
19851985
},
1986-
{"name": "Instance Rate", "unit": "USD/Hrs", "value": "0.008"},
1986+
{"name": "On-demand Instance Rate", "unit": "USD/Hr", "value": "0.008"},
19871987
),
19881988
],
19891989
)
@@ -2024,7 +2024,7 @@ def test_get_instance_rate_per_hour(
20242024
}
20252025
}
20262026
},
2027-
{"name": "Instance Rate", "unit": "USD/Hrs", "value": "0.9"},
2027+
{"name": "On-demand Instance Rate", "unit": "USD/Hr", "value": "0.9"},
20282028
),
20292029
],
20302030
)

0 commit comments

Comments
 (0)