You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Creating a PyTorchModel-based endpoint that attempts to update the PATH or PYTHONPATH environment variables results in a UnexpectedStatusException.
To reproduce
Create any PyTorchModel object and add: env={"PATH": "/opt/ml/model/code/lib:${PATH}"} or env={"PYTHONPATH": "/opt/ml/model/code/lib:${PYTHONPATH}"} during model definition.
Expected behavior
The model should be created and endpoint deployed successfully.
I was able to resolve this by setting PYTHONPATH without trying to use the existing env var PYTHONPATH. So, the env var definition would be: env={"PYTHONPATH": "/opt/ml/model/code/lib"}.
And then the container build step takes care of adding in the other env vars that are required. The final PYTHONPATH in the container, then is: '/.sagemaker/mms/models/model/code:sagemaker_pytorch_serving_container.handler_service:/opt/ml/model/code:/opt/ml/model/code/lib:/.sagemaker/mms/models/model'.
Ideally, this shouldn't have been breaking but I'm fine with closing this.
Describe the bug
Creating a PyTorchModel-based endpoint that attempts to update the
PATH
orPYTHONPATH
environment variables results in aUnexpectedStatusException
.To reproduce
Create any PyTorchModel object and add:
env={"PATH": "/opt/ml/model/code/lib:${PATH}"}
orenv={"PYTHONPATH": "/opt/ml/model/code/lib:${PYTHONPATH}"}
during model definition.Expected behavior
The model should be created and endpoint deployed successfully.
Screenshots or logs
Traceback:
System information
A description of your system. Please provide:
Additional context
Updating
PATH
is required because of the bug mentioned in #1832.The text was updated successfully, but these errors were encountered: