aws / sagemaker-core

Apache License 2.0
5 stars 3 forks source link

Model.create() failed to set the model environment #154

Closed pintaoz-aws closed 1 month ago

pintaoz-aws commented 1 month ago

Feedback from karpmar@, Model.create() has created a model, but the model doesn't have the environment set in the input.

Screenshot 2024-08-21 at 3 54 44 PM Screenshot 2024-08-21 at 3 56 10 PM

pintaoz-aws commented 1 month ago

I found that the root cause is that the input parameter for ContainerDefinition was a typo enviroment. It doesn't throw any error because environment is an optional argument. We may need to add a check for unexpected inputs

benieric commented 1 month ago

Is this still an issue?

When I test with TrainingJob.create() and an unexpected extra argurment, I get a validation error. image

image

benieric commented 1 month ago

Ok, nvm this seems like a different issue. I am able to reproduce. Below should throw validation error but it does not:

image

benieric commented 1 month ago

Seems related to a missing param in pydantic model Config

image

benieric commented 1 month ago

https://github.com/aws/sagemaker-core/pull/173