Skip to content

Commit 86b78f3

Browse files
committed
fix: honor json serialization of HPs
1 parent c66a39e commit 86b78f3

File tree

1 file changed

+0
-9
lines changed
  • src/sagemaker/modules/train/container_drivers/common

1 file changed

+0
-9
lines changed

src/sagemaker/modules/train/container_drivers/common/utils.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,6 @@ def safe_deserialize(data: Any) -> Any:
124124
125125
This function handles the following cases:
126126
1. If `data` is not a string, it returns the input as-is.
127-
2. If `data` is a string and matches common boolean values ("true" or "false"),
128-
it returns the corresponding boolean value (True or False).
129127
3. If `data` is a JSON-encoded string, it attempts to deserialize it using `json.loads()`.
130128
4. If `data` is a string but cannot be decoded as JSON, it returns the original string.
131129
@@ -134,13 +132,6 @@ def safe_deserialize(data: Any) -> Any:
134132
"""
135133
if not isinstance(data, str):
136134
return data
137-
138-
lower_data = data.lower()
139-
if lower_data in ["true"]:
140-
return True
141-
if lower_data in ["false"]:
142-
return False
143-
144135
try:
145136
return json.loads(data)
146137
except json.JSONDecodeError:

0 commit comments

Comments
 (0)