File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
src/sagemaker/modules/train/container_drivers/common Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,6 @@ def safe_deserialize(data: Any) -> Any:
124
124
125
125
This function handles the following cases:
126
126
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).
129
127
3. If `data` is a JSON-encoded string, it attempts to deserialize it using `json.loads()`.
130
128
4. If `data` is a string but cannot be decoded as JSON, it returns the original string.
131
129
@@ -134,13 +132,6 @@ def safe_deserialize(data: Any) -> Any:
134
132
"""
135
133
if not isinstance (data , str ):
136
134
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
-
144
135
try :
145
136
return json .loads (data )
146
137
except json .JSONDecodeError :
You can’t perform that action at this time.
0 commit comments