- Newest
- Most votes
- Most comments
Hello there,
Thank you for contacting.
The error specifically comes up when you are trying to use a subscript for a data-type which isn't subscript-able, in your case this is coming when you are treating the object _StepArguments
as a dictionary. A workaround for the same will be to implement a __get_item___
function in your code. A sample for the same is as follows:
def __getitem__(self, key):
return self.__dict__[key]
However, as this was working on Sage-maker instance by default, also share the Python version that you are using and if you are using the same version of library in both Lambda function and SageMaker.
_StepArguments
is a new concept introduced in newer version of SageMaker Python SDK. If you want to keep you original code, you need to pin the same SDK version in Lambda as in your notebook instance. Normally, I guess you will be installing the latest version but there has been a compatibility-broken change since then.
If you are OK to code changes, you could follow https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#build-and-manage-properties to use properties
of each step, which maps to Describe*
response. You will still be able to retrieve any job info. This is actually the recommended way.
Relevant content
- asked 2 years ago
- asked 2 years ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 2 months ago