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:
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 :
You can’t perform that action at this time.
0 commit comments