Skip to content

UQLM Import Time Check#67

Merged
dylanbouchard merged 9 commits into
cvs-health:developfrom
mehtajinesh:feature/import-time-check
Jun 28, 2025
Merged

UQLM Import Time Check#67
dylanbouchard merged 9 commits into
cvs-health:developfrom
mehtajinesh:feature/import-time-check

Conversation

@mehtajinesh

Copy link
Copy Markdown
Contributor
  • Added a unit test for UQML import time check.
  • Considered the most time exhausting use-case (which is using sentence-transformer models).

@mehtajinesh mehtajinesh changed the base branch from main to develop June 19, 2025 17:39
@mehtajinesh

Copy link
Copy Markdown
Contributor Author

@dskarbrevik @dylanbouchard @mohitcek Please review and let me know your thoughts. Thanks.

@dylanbouchard

Copy link
Copy Markdown
Collaborator

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

@mohitcek @dskarbrevik @virenbajaj

@dylanbouchard dylanbouchard changed the title UQML Import Time Check UQLM Import Time Check Jun 22, 2025
@dylanbouchard dylanbouchard self-requested a review June 22, 2025 20:32

@dylanbouchard dylanbouchard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dylanbouchard linked an issue Jun 22, 2025 that may be closed by this pull request
@mehtajinesh

Copy link
Copy Markdown
Contributor Author

@dylanbouchard updated changes as requested. Thanks.

@mehtajinesh mehtajinesh changed the base branch from develop to main June 26, 2025 16:39
@mehtajinesh mehtajinesh changed the base branch from main to develop June 26, 2025 16:39
@dylanbouchard

Copy link
Copy Markdown
Collaborator

@mehtajinesh can you please resolve the merge conflicts by pulling the latest changes from develop branch?

@dylanbouchard dylanbouchard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve merge conflicts

"source": [
"from importlib import reload\n",
"import uqlm\n",
"import uqlm.scorers.ensemble\n",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we actually remove this cell? it should have been removed in the last PR. Besides that all looks good!

@dylanbouchard dylanbouchard merged commit 34a861c into cvs-health:develop Jun 28, 2025
Mihir3 pushed a commit to Mihir3/uqlm that referenced this pull request Jul 7, 2025
* 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
nklswld pushed a commit to nklswld/uqlm_white_box_scorer that referenced this pull request Nov 7, 2025
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

import speed optimization

2 participants