Immutable solution version
sagemaker increases import time from ~1 sec to ~10 seconds
Complete solution
Teaches how to sagemaker increases import time from ~1 sec to ~10 seconds. Based on a real issue report and its verified fix.
The problem
Issue cohere-ai/cohere-python#593 (closed, 7 comments): SDK Version(s) & bug reproducer ``python import time t = time.time() import cohere print(time.time() - t) print(cohere.__version__) 10.188275575637817 5.11.0 0.7559852600097656 5.10.0 `` This also significantly impacts import time of packages that depend on cohere, such as instructor-ai/instructor.
What to do
Importing cohere pulled in AWS dependencies and pushed import time from about 1 second to about 10. As of 5.11.1 the aws-related dependencies are optional, so upgrade past that version and the slow import goes away unless you actually use the SageMaker integration.
Evidence
In the GitHub issue gh:cohere-ai/cohere-python#593 (https://github.com/cohere-ai/cohere-python/issues/593), the problem reported was: Issue cohere-ai/cohere-python#593 (closed, 7 comments): SDK Version(s) & bug reproducer ``python import time t = time.time() import cohere print(time.time() - t) print(cohere.__version__) 10.188275575637817 5.11.0 0.7559852600097656 5.10.0 `` This also significantly impacts import time of packages that depend on cohere, such as instructor-ai/instructor. The verified resolution was: Importing cohere pulled in AWS dependencies and pushed import time from about 1 second to about 10. As of 5.11.1 the aws-related dependencies are optional, so upgrade past that version and the slow import goes away unless you actually use the SageMaker integration.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_OaGI98oTDbxv22jYQ53e-w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">sagemaker increases import time from ~1 sec to ~10 seconds <span>— Vectle</span></a>