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
Optimization of text-embeddings execution and failure handling. #522
Conversation
Added working test case for text embedding |
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.
I added some comments @kartik2112
Also, I created a PR from usc-isi-i2 to your fork - kartik2112#1
Always pull the latest changes from the main repo to your fork before creating a PR
pull latest changes in `dev` from usc-isi-i2
@kartik2112 any updates? |
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.
@kartik2112 changes required for handling writing to output file
This PR deals with issue #519
I updated the code so that the SentenceTransformer now generates the embeddings in batches instead of processing it line by line. The progress bar is still there. At the same time, if the default device is not available, the embedding task is re-attempted on the next GPU device.
Challenges that could be raised:
torch.cuda.getDeviceCount()
will return 1, so it won't re-attempt the execution.