-
Notifications
You must be signed in to change notification settings - Fork 16.9k
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
Update ascend.py #30060
Merged
Merged
Update ascend.py #30060
+13
−1
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add batch_size to fix oom when embed large amount texts
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
fix E501 Line too long (101 > 88)
fix error
fix error
fix I001 Import block is un-sorted or un-formatted
fix Error: Process completed with exit code 2.
fix Error: Process completed with exit code 2.
fix make: *** [Makefile:55: lint_package] Error 1
ccurme
approved these changes
Mar 1, 2025
texts_ = texts[i : i + self.batch_size] | ||
emb = self.encode([self.document_instruction + text for text in texts_]) | ||
embedding_list.append(emb) | ||
return np.concatenate(embedding_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we concatenating along the correct axis here?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🤖:bug
Related to a bug, vulnerability, unexpected error with an existing feature
community
Related to langchain-community
Ɑ: embeddings
Related to text embedding models module
lgtm
PR looks good. Use to confirm that a PR is ready for merging.
size:S
This PR changes 10-29 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add batch_size to fix oom when embed large amount texts
Thank you for contributing to LangChain!
PR title: "package: description"
PR message: Delete this entire checklist and replace with
Add tests and docs: If you're adding a new integration, please include
docs/docs/integrations
directory.Lint and test: Run
make format
,make lint
andmake test
from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/Additional guidelines:
If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.