-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime dependency on setuptools from importing distutils #4534
Comments
Also remove from tests. Closes aws#4534
Also remove from tests. Closes aws#4534
Also remove from tests. Closes aws#4534
Also remove from tests. Closes aws#4534
Also remove from tests. Closes aws#4534
Thank you for taking the time to document and attempt fixing this @jmahlik! As a new user of AWS SageMaker, I am running into this bug when attempting to deploy a model using the SageMaker SDK. |
relates to #3028 |
Also remove from tests. Closes aws#4534
Python 3.12 has been out for a couple months now, why is this still open? I'm currently running into exactly this problem. Python 3.12 is also already available as Lambda Runtime in AWS, so SageMaker SDK should follow as soon as possible. |
See #4544 (comment). Removing the dependency causes a few integration tests to fail. Waiting on a response for how to handle that (it's complicated). There's a workaround by adding setuptools as an explicit dependency/making sure it is installed in the environment where the code is being run. |
Also remove from tests. Closes aws#4534
Describe the bug
Distutils was removed from the standard library in python 3.12. Environments created under 3.12 no longer contain setuptools by default. Distutils itself is also deprecated.
There's a few usages of distutils in the sagemaker python sdk. They are easily replaced by shutil. I do see a comment in
sagemaker.workflow._repack_model
about not wanting to use shutil. But with thedirs_exist_ok=True
parameter added in python 3.8, it wouldn't fail on existing directories. So all supported python versions now have an alternative.sagemaker-python-sdk/src/sagemaker/workflow/_repack_model.py
Lines 30 to 35 in e163807
I'll submit a PR to remove the deprecated calls in the source.
To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be complete and runnable, if additional data is needed, please include them in the issue.
Expected behavior
Imports do not fail.
Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.
System information
A description of your system. Please provide:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: