UQLM Import Time Check#67
Conversation
mehtajinesh
commented
Jun 19, 2025
- Added a unit test for UQML import time check.
- Considered the most time exhausting use-case (which is using sentence-transformer models).
|
@dskarbrevik @dylanbouchard @mohitcek Please review and let me know your thoughts. Thanks. |
|
Thanks Jinesh! If we want to speed up importing BlackBoxUQ we can save the import of sentence transformers for instantiation of cosine scorer class. That way it's only imported if users specify cosine scorer in scorer list |
There was a problem hiding this comment.
Let's move the import of sentence_transformers inside the constructor of CosineScorer to speed up imports such as BlackBoxUQ
@mehtajinesh in this line: https://github.com/cvs-health/uqlm/blob/main/uqlm/black_box/cosine.py#L20 to this line https://github.com/cvs-health/uqlm/blob/main/uqlm/black_box/cosine.py#L36
After that I will approve and merge. Thanks!
|
@dylanbouchard updated changes as requested. Thanks. |
|
@mehtajinesh can you please resolve the merge conflicts by pulling the latest changes from develop branch? |
dylanbouchard
left a comment
There was a problem hiding this comment.
Please resolve merge conflicts
| "source": [ | ||
| "from importlib import reload\n", | ||
| "import uqlm\n", | ||
| "import uqlm.scorers.ensemble\n", |
There was a problem hiding this comment.
Can we actually remove this cell? it should have been removed in the last PR. Besides that all looks good!
* added test for checking import time * added vscode temp files to gitignore * updated sentence transformer import location * fixing style issues * added llm config testing changes * added settings as well to gitignore * fixed formatting for import test time * fixed tensorflow imports errors for testing and merge conflicts
* added test for checking import time * added vscode temp files to gitignore * updated sentence transformer import location * fixing style issues * added llm config testing changes * added settings as well to gitignore * fixed formatting for import test time * fixed tensorflow imports errors for testing and merge conflicts