-
Notifications
You must be signed in to change notification settings - Fork 67
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
sagemaker increases import time from ~1 sec to ~10 seconds #593
Comments
It's also adding a lot of noise to the logs
|
Facing the same issue. Just want to use the Rerank models directly from the Cohere API, but the It'd be great if we could install only the core Cohere platform stuff by default, with optional installs for specific platforms (Bedrock, SageMaker, Azure, GCP, Oracle OCI) This way, we can avoid the slow imports and unnecessary dependencies when we're just using the basic Cohere API. Could we have a Thank you! |
To speed up imports until this is fixed on the next release, you can switch to previous release:
|
+1, it is definitely a pain now with the sagemaker dependency. If you set logging to debug you can see it is making a ton of network requests at import time? I guess it is trying to get some configuration stuff and is assuming you are importing sagemaker on an aws machine. I see logs like this being generated:
with a few retries. To be clear, this happens when you import sagemaker alone so doesn't seem an issue with cohere besides the dependency. Not sure why the sagemaker library is designed like that. |
@billytrend-cohere @1vn - I believe the issue began with #588, with the introduction of sagemaker as a dependency. Perhaps you could make this an optional dependency, such that the default install does not increase import time by ~10 seconds? e.g.
|
Hey @ben-albrecht thanks for flagging this. I've made the aws-related dependencies optional now as of 5.11.1. I will try out your script to confirm that the issue is resolved! Thanks |
Ok I think we're good but please re-open if you have related issues! I see:
|
SDK Version(s) & bug reproducer
This also significantly impacts import time of packages that depend on cohere, such as instructor-ai/instructor.
The text was updated successfully, but these errors were encountered: