perf: use module-scoped fixture for RAG tests#337
Merged
nrfulton merged 3 commits intogenerative-computing:mainfrom Jan 23, 2026
Merged
perf: use module-scoped fixture for RAG tests#337nrfulton merged 3 commits intogenerative-computing:mainfrom
nrfulton merged 3 commits intogenerative-computing:mainfrom
Conversation
Contributor
|
The PR description has been updated. Please fill out the template for your PR to be reviewed. |
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
Contributor
Author
|
Rebased and retested with the pytest markers fix (now in main)
for full run. |
6ae3b5a to
219b5d7
Compare
nrfulton
approved these changes
Jan 23, 2026
jakelorocco
approved these changes
Jan 23, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Optimize RAG Test Performance
Type of PR
Description
This PR optimizes the RAG intrinsic test suite by changing the backend fixture from function-scoped to module-scoped. The backend fixture loads a 3B parameter model (granite-4.0-micro) which was being reloaded for each of the 7 tests in the file, causing significant overhead (a big proportion of the overal tests runnable on this system as per #326)
Fixes #336
Performance Impact:
Safety Justification:
The change is a single line addition (
scope="module") to the fixture decorator, so should be a low-risk optimization with significant benefits.Testing
uv run pytest test/stdlib/components/intrinsic/test_rag.py -vNOTE: Testing was done on a base of #326 , but have created a clean delta here - will rebase/retest once that merged