aws / sagemaker-core

Apache License 2.0
5 stars 3 forks source link

Fix _serialize_args() for dict parameters #157

Closed pintaoz-aws closed 1 month ago

pintaoz-aws commented 1 month ago

Issue #, if available:

Description of changes: If the input argument contains a dict parameter, and the dict contains some value with non-primitive types (e.g. resource class), _serialize_args() won't serialize these non-primitive types, and the botocore API will reject this input. This PR renames _serialize_args() to serialize() and adds a condition to serialize for dict type to fix this issue. I also moved all serialize method to utils.py and removed them from the Base classes to improve the confusion between Base classes in resource.py and shape.py

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.