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
The general scenario of using slim_handler does work for me, but when it comes to importing AWS SageMaker using import sagemaker the issue takes place.
Expected Behavior
AWS SageMaker imports normally.
Actual Behavior
AWS SageMaker import raising the following exception:
import sagemaker
File "/tmp/lds-topic-modeling/sagemaker/__init__.py", line 15, in <module>
from sagemaker import estimator # noqa: F401
File "/tmp/lds-topic-modeling/sagemaker/estimator.py", line 22, in <module>
from sagemaker.analytics import TrainingJobAnalytics
File "/tmp/lds-topic-modeling/sagemaker/analytics.py", line 22, in <module>
from sagemaker.session import Session
File "/tmp/lds-topic-modeling/sagemaker/session.py", line 28, in <module>
from sagemaker.user_agent import prepend_user_agent
File "/tmp/lds-topic-modeling/sagemaker/user_agent.py", line 22, in <module>
SDK_VERSION = pkg_resources.require('sagemaker')[0].version
File "/var/task/pkg_resources/__init__.py", line 891, in require
needed = self.resolve(parse_requirements(requirements))
File "/var/task/pkg_resources/__init__.py", line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'sagemaker' distribution was not found and is required by the application
Possible Fix
I could not say about direct resolution of this issue. Whatever would allow to trick pkg_resources to provide proper results. Here is user_agent.py file:
It should be possible to reproduce after using single file with the only statement import sagemaker in file. For example, sample app.py for Flask application.
Context
The general scenario of using
slim_handler
does work for me, but when it comes to importing AWS SageMaker usingimport sagemaker
the issue takes place.Expected Behavior
AWS SageMaker imports normally.
Actual Behavior
AWS SageMaker import raising the following exception:
Possible Fix
I could not say about direct resolution of this issue. Whatever would allow to trick
pkg_resources
to provide proper results. Here isuser_agent.py
file:Steps to Reproduce
It should be possible to reproduce after using single file with the only statement
import sagemaker
in file. For example, sampleapp.py
for Flask application.Environment
requirements.txt
The text was updated successfully, but these errors were encountered: